On 06/05/2025 11:12, luyulin wrote:
> +static int eic7700_pinctrl_probe(struct platform_device *pdev)
> +{
> +     struct device *dev = &pdev->dev;
> +     struct pinctrl_dev *pctldev;
> +     struct eic7700_pinctrl *pc;
> +     struct regulator *regulator;
> +     u32 voltage, rgmii0_mode, rgmii1_mode;
> +     int ret;
> +
> +     pc = devm_kzalloc(dev, struct_size(pc, functions, 
> EIC7700_FUNCTIONS_COUNT), GFP_KERNEL);
> +     if (!pc)
> +             return -ENOMEM;
> +
> +     pc->base = devm_platform_ioremap_resource(pdev, 0);
> +     if (IS_ERR(pc->base))
> +             return PTR_ERR(pc->base);
> +
> +     regulator = devm_regulator_get(dev, "vrgmii");
> +     if (IS_ERR_OR_NULL(regulator)) {
> +             dev_err(dev, "failed to get vrgmii regulator!\n");

Hm? So here you do not use dev_err_probe, even though it is actually
important, but...



...

> +
> +     ret = devm_pinctrl_register_and_init(dev, &pc->desc, pc, &pctldev);
> +     if (ret)
> +             return dev_err_probe(dev, ret, "could not register pinctrl 
> driver\n");

Here you use, even though here it actually does not matter? It makes no
sense, it is not logical. If using dev_err_probe selectively, then use
it when it matters - so for probe deferal. Or preferred is to use it always.



Best regards,
Krzysztof

Reply via email to