From: Anand Moon <linux.amoon@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org (open list:PCI POWER CONTROL),
linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1] PCI/pwrctrl: Propagate dev_err_probe return value
Date: Sat, 18 Oct 2025 12:32:18 +0530 [thread overview]
Message-ID: <20251018070221.7872-1-linux.amoon@gmail.com> (raw)
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@gmail.com>
---
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");
regulator_bulk_free(slot->num_supplies, slot->supplies);
return ret;
}
base-commit: f406055cb18c6e299c4a783fc1effeb16be41803
--
2.50.1
next reply other threads:[~2025-10-18 7:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 7:02 Anand Moon [this message]
2025-10-18 7:31 ` [PATCH v1] PCI/pwrctrl: Propagate dev_err_probe return value Christophe JAILLET
2025-10-18 16:05 ` [PATCH] " Markus Elfring
2025-10-19 8:16 ` Anand Moon
2025-10-19 8:56 ` Markus Elfring
2025-10-19 10:19 ` Anand Moon
2025-10-18 15:13 ` [PATCH] " Markus Elfring
2025-10-31 8:28 ` [PATCH v1] " Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251018070221.7872-1-linux.amoon@gmail.com \
--to=linux.amoon@gmail.com \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).