Re: [PATCH v1] PCI/pwrctrl: Propagate dev_err_probe return value
From: Manivannan Sadhasivam
Date: Fri Oct 31 2025 - 04:29:00 EST
On Sat, Oct 18, 2025 at 12:32:18PM +0530, Anand Moon wrote:
> 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.
>
> Signed-off-by: Anand Moon <linux.amoon@xxxxxxxxx>
> ---
> drivers/pci/pwrctrl/slot.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/pwrctrl/slot.c b/drivers/pci/pwrctrl/slot.c
> index 3320494b62d89..36a6282fd222d 100644
> --- a/drivers/pci/pwrctrl/slot.c
> +++ b/drivers/pci/pwrctrl/slot.c
> @@ -41,14 +41,13 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
> ret = of_regulator_bulk_get_all(dev, dev_of_node(dev),
> &slot->supplies);
> if (ret < 0) {
> - dev_err_probe(dev, ret, "Failed to get slot regulators\n");
> - return ret;
> + return dev_err_probe(dev, ret, "Failed to get slot regulators\n");
> }
>
> slot->num_supplies = ret;
> ret = regulator_bulk_enable(slot->num_supplies, slot->supplies);
> if (ret < 0) {
> - dev_err_probe(dev, ret, "Failed to enable slot regulators\n");
> + ret = dev_err_probe(dev, ret, "Failed to enable slot regulators\n");
Again a pointless change.
- Mani
--
மணிவண்ணன் சதாசிவம்