From: Wu Fengguang Date: Wed, 21 Jan 2015 11:19:45 +0000 (+0800) Subject: mmc: sdhci: host: fix odd_ptr_err.cocci warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e7cf90213e789bdc13f2638cc9d8b9993d5491e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mmc: sdhci: host: fix odd_ptr_err.cocci warnings 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index c1bb156445e4..2fe8b91481b3 100644 --- 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 platform_device *pdev) 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; }