From: Anand Moon <linux.amoon@gmail.com>
To: "Kevin Xie" <kevin.xie@starfivetech.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org (open list:PCIE DRIVER FOR STARFIVE
JH71x0), linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1] PCI: starfive: Propagate dev_err_probe return value
Date: Fri, 17 Oct 2025 21:44:23 +0530 [thread overview]
Message-ID: <20251017161425.7390-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 starfive_pcie_clk_rst_init() and
starfive_pcie_enable_phy() function. This ensures the original error code
are propagation for debugging.
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
drivers/pci/controller/plda/pcie-starfive.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/controller/plda/pcie-starfive.c b/drivers/pci/controller/plda/pcie-starfive.c
index 3caf53c6c082..192d7a6a7c6c 100644
--- a/drivers/pci/controller/plda/pcie-starfive.c
+++ b/drivers/pci/controller/plda/pcie-starfive.c
@@ -180,7 +180,7 @@ static int starfive_pcie_clk_rst_init(struct starfive_jh7110_pcie *pcie)
ret = reset_control_deassert(pcie->resets);
if (ret) {
clk_bulk_disable_unprepare(pcie->num_clks, pcie->clks);
- dev_err_probe(dev, ret, "failed to deassert resets\n");
+ ret = dev_err_probe(dev, ret, "failed to deassert resets\n");
}
return ret;
@@ -241,13 +241,13 @@ static int starfive_pcie_enable_phy(struct device *dev,
ret = phy_set_mode(pcie->phy, PHY_MODE_PCIE);
if (ret) {
- dev_err_probe(dev, ret, "failed to set pcie mode\n");
+ ret = dev_err_probe(dev, ret, "failed to set pcie mode\n");
goto err_phy_on;
}
ret = phy_power_on(pcie->phy);
if (ret) {
- dev_err_probe(dev, ret, "failed to power on pcie phy\n");
+ ret = dev_err_probe(dev, ret, "failed to power on pcie phy\n");
goto err_phy_on;
}
base-commit: 98ac9cc4b4452ed7e714eddc8c90ac4ae5da1a09
--
2.50.1
next reply other threads:[~2025-10-17 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 16:14 Anand Moon [this message]
2025-10-18 8:24 ` [PATCH] PCI: starfive: Propagate dev_err_probe return value Markus Elfring
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=20251017161425.7390-1-linux.amoon@gmail.com \
--to=linux.amoon@gmail.com \
--cc=bhelgaas@google.com \
--cc=kevin.xie@starfivetech.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@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