From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] PCI: faraday: fix inconsistent IS_ERR and PTR_ERR
Date: Tue, 17 Oct 2017 12:07:17 -0500 [thread overview]
Message-ID: <20171017170717.GA30633@embeddedor.com> (raw)
Fix inconsistent IS_ERR and PTR_ERR in faraday_pci_probe.
The proper pointer to be passed as argument is p->bus_clk.
This issue was detected with the help of Coccinelle.
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
This code was tested by compilation only.
drivers/pci/host/pci-ftpci100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c
index 06d9687..fae6bd1 100644
--- a/drivers/pci/host/pci-ftpci100.c
+++ b/drivers/pci/host/pci-ftpci100.c
@@ -463,7 +463,7 @@ static int faraday_pci_probe(struct platform_device *pdev)
}
p->bus_clk = devm_clk_get(dev, "PCICLK");
if (IS_ERR(p->bus_clk))
- return PTR_ERR(clk);
+ return PTR_ERR(p->bus_clk);
ret = clk_prepare_enable(p->bus_clk);
if (ret) {
dev_err(dev, "could not prepare PCICLK\n");
--
2.7.4
next reply other threads:[~2017-10-17 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 17:07 Gustavo A. R. Silva [this message]
2017-10-20 23:05 ` [PATCH] PCI: faraday: fix inconsistent IS_ERR and PTR_ERR Bjorn Helgaas
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=20171017170717.GA30633@embeddedor.com \
--to=garsilva@embeddedor.com \
--cc=bhelgaas@google.com \
--cc=julia.lawall@lip6.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.