aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-10-17 08:11:03 -0400
committerBjorn Helgaas <bhelgaas@google.com>2017-10-20 19:02:46 -0400
commitb3c433efb8a3d347ddc39b95606a6e7732e97649 (patch)
tree79c7241024e7b00f0313605452c69d801d22af06
parent9e66317d3c92ddaab330c125dfe9d06eee268aff (diff)
PCI: faraday: Fix wrong pointer passed to PTR_ERR()
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: 2eeb02b28579 ("PCI: faraday: Add clock handling") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pci/host/pci-ftpci100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c
index 96028f01bc90..a19919c17d04 100644
--- a/drivers/pci/host/pci-ftpci100.c
+++ b/drivers/pci/host/pci-ftpci100.c
@@ -481,7 +481,7 @@ static int faraday_pci_probe(struct platform_device *pdev)
481 } 481 }
482 p->bus_clk = devm_clk_get(dev, "PCICLK"); 482 p->bus_clk = devm_clk_get(dev, "PCICLK");
483 if (IS_ERR(p->bus_clk)) 483 if (IS_ERR(p->bus_clk))
484 return PTR_ERR(clk); 484 return PTR_ERR(p->bus_clk);
485 ret = clk_prepare_enable(p->bus_clk); 485 ret = clk_prepare_enable(p->bus_clk);
486 if (ret) { 486 if (ret) {
487 dev_err(dev, "could not prepare PCICLK\n"); 487 dev_err(dev, "could not prepare PCICLK\n");