[PATCH] PCI: rockchip: Propagate dev_err_probe return value

Markus Elfring Markus.Elfring at web.de
Sat Oct 18 02:50:36 PDT 2025


>> I find the change description improvable.
>>
> Ok, is this ok?

I present other wording preferences.


> When using the dev_err_probe() helper function in rockchip_pcie_init_port(),
> ensure its return value is consistently assigned to the return variable.

I hope that we can achieve consensus on the corresponding source code places.
https://elixir.bootlin.com/linux/v6.17.1/source/drivers/pci/controller/pcie-rockchip.c#L115-L202


> This guarantees that the original error code, whether it's a specific error
> or -EPROBE_DEFER,
> is correctly propagated up the call stack for proper error handling
> and debugging.

The mentioned programming interface should be applied correctly.


>> Would an other source code variant become more desirable?
>> https://elixir.bootlin.com/linux/v6.17.1/source/drivers/base/core.c#L5031-L5075
>>
>>         err = dev_err_probe(dev,
>>                             reset_control_bulk_assert(ROCKCHIP_NUM_CORE_RSTS, rockchip->core_rsts),
>>                             "Couldn't assert Core resets\n");
>>         if (err)
>>                 goto err_exit_phy;
> 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. …

Do you think that anything different would happen according to my transformation suggestion?

Regards,
Markus



More information about the Linux-rockchip mailing list