linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: tegra: Fix reporting GPIO error value
@ 2020-04-14 10:25 Pali Rohár
  2020-04-14 11:31 ` Michał Mirosław
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pali Rohár @ 2020-04-14 10:25 UTC (permalink / raw)
  To: Thierry Reding, Lorenzo Pieralisi, Andrew Murray
  Cc: Bjorn Helgaas, Jonathan Hunter, linux-tegra, linux-pci, linux-kernel

Error code is stored in rp->reset_gpio and not in err variable.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 drivers/pci/controller/pci-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index 0e03cef72840..378d5a8773c7 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2314,8 +2314,8 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)
 			if (PTR_ERR(rp->reset_gpio) == -ENOENT) {
 				rp->reset_gpio = NULL;
 			} else {
-				dev_err(dev, "failed to get reset GPIO: %d\n",
-					err);
+				dev_err(dev, "failed to get reset GPIO: %ld\n",
+					PTR_ERR(rp->reset_gpio));
 				return PTR_ERR(rp->reset_gpio);
 			}
 		}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-11  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 10:25 [PATCH] PCI: tegra: Fix reporting GPIO error value Pali Rohár
2020-04-14 11:31 ` Michał Mirosław
2020-04-15 11:17   ` Pali Rohár
2020-04-15 16:49     ` Michał Mirosław
2020-04-14 13:51 ` Thierry Reding
2020-05-07 19:44 ` Rob Herring
2020-05-11  9:47 ` Lorenzo Pieralisi

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).