Re: [PATCH] PCI/pwrctrl: Propagate dev_err_probe return value
From: Markus Elfring
Date: Sat Oct 18 2025 - 11:13:43 EST
> Ensure that the return value from dev_err_probe() is consistently assigned
> back to return in all error paths within pci_pwrctrl_slot_probe()
> function. This ensures the original error code are propagation for
> debugging.
I find the change description improvable.
I propose to take another source code transformation approach 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/pwrctrl/slot.c#L30-L80
ret = dev_err_probe(dev,
of_regulator_bulk_get_all(dev, dev_of_node(dev), &slot->supplies),
"Failed to get slot regulators\n");
if (ret)
return ret;
Regards,
Markus