[PATCH 1/3] PCI: j721e: Propagate dev_err_probe return value
Anand Moon
linux.amoon at gmail.com
Sun Oct 19 03:15:58 PDT 2025
Hi Markus, Vignesh,
On Sat, 18 Oct 2025 at 16:12, Markus Elfring <Markus.Elfring at web.de> wrote:
>
> >> I propose to take another source code transformation approach better into account.
> >> https://elixir.bootlin.com/linux/v6.17.1/source/drivers/base/core.c#L5031-L5075
> >>
> >> Example:
> >> https://elixir.bootlin.com/linux/v6.17.1/source/drivers/pci/controller/cadence/pci-j721e.c#L444-L636
> >>
> >> ret = dev_err_probe(dev, cdns_pcie_init_phy(dev, cdns_pcie), "Failed to init phy\n");
> >> if (ret)
> >> goto err_get_sync;
> >>
> > No, the correct code ensures that dev_err_probe() is only called when
> > an actual error
> > has occurred, providing a clear and accurate log entry. …
>
> Where do you see undesirable technical differences?
The primary issue I wanted to confirm was the function execution order.
since cdns_pcie_init_phy within dev_err_probe function
If other developers agree with the approach, I will modify this in a
separate patch
As Dan Carpenter pointed out - " Wait, no, this doesn't make sense.
It's just assigning ret to itself."
This patch seems irrelevant to me as the return value gets propagated
to the error path.
Sorry for the noise. Let's drop these changes.
Since I don't have this hardware for testing, I will verify it on
another available device.
>
> Regards,
> Markus
Thanks
-Anand
More information about the linux-arm-kernel
mailing list