From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759157AbdJQRHU (ORCPT ); Tue, 17 Oct 2017 13:07:20 -0400 Received: from gateway34.websitewelcome.com ([192.185.148.204]:29930 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445AbdJQRHT (ORCPT ); Tue, 17 Oct 2017 13:07:19 -0400 Date: Tue, 17 Oct 2017 12:07:17 -0500 From: "Gustavo A. R. Silva" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Julia Lawall , "Gustavo A. R. Silva" Subject: [PATCH] PCI: faraday: fix inconsistent IS_ERR and PTR_ERR Message-ID: <20171017170717.GA30633@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.172.29.132 X-Exim-ID: 1e4VKo-003iT1-54 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [187.172.29.132]:41476 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Gustavo A. R. Silva --- 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