From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] mmc: sdhci: host: fix odd_ptr_err.cocci warnings Date: Wed, 21 Jan 2015 19:19:45 +0800 Message-ID: <20150121111944.GA229257@athens> References: <201501211941.NPuKVMjL%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga09.intel.com ([134.134.136.24]:26805 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbbAULUD (ORCPT ); Wed, 21 Jan 2015 06:20:03 -0500 Content-Disposition: inline In-Reply-To: <201501211941.NPuKVMjL%fengguang.wu@intel.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Vincent Yang Cc: kbuild-all@01.org, Ulf Hansson , Andy Green , Tetsuya Takinishi , Chris Ball , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org drivers/mmc/host/sdhci_f_sdh30.c:143:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 144 PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Vincent Yang Signed-off-by: Fengguang Wu --- sdhci_f_sdh30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -141,7 +141,7 @@ static int sdhci_f_sdh30_probe(struct pl res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->ioaddr = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->ioaddr)) { - ret = PTR_ERR(host); + ret = PTR_ERR(host->ioaddr); goto err; }