linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data()
@ 2017-01-25 14:03 Wei Yongjun
  2017-01-25 14:25 ` Tomasz Figa
  2017-02-05 15:58 ` [PATCH -next v2] " Wei Yongjun
  0 siblings, 2 replies; 11+ messages in thread
From: Wei Yongjun @ 2017-01-25 14:03 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki,
	Chanwoo Choi, Linus Walleij
  Cc: Wei Yongjun, linux-arm-kernel, linux-samsung-soc, linux-gpio

From: Wei Yongjun <weiyongjun1@huawei.com>

In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.

Fixes: 8b1bd11c1f8f ("pinctrl: samsung: Add the support the multiple
IORESOURCE_MEM for one pin-bank")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index 3bc925f..9c03eab 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -1009,7 +1009,7 @@ samsung_pinctrl_get_soc_data(struct samsung_pinctrl_drv_data *d,
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
 		virt_base[i] = devm_ioremap(&pdev->dev, res->start,
 						resource_size(res));
-		if (IS_ERR(virt_base[i]))
+		if (!virt_base[i])
 			return ERR_PTR(-EIO);
 	}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-15 13:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 14:03 [PATCH -next] pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data() Wei Yongjun
2017-01-25 14:25 ` Tomasz Figa
2017-02-05 15:58 ` [PATCH -next v2] " Wei Yongjun
2017-02-07 19:56   ` Krzysztof Kozlowski
2017-02-13 14:49   ` Linus Walleij
2017-02-21 13:49     ` Marek Szyprowski
2017-02-21 14:14       ` Tomasz Figa
2017-02-21 15:32       ` Krzysztof Kozlowski
2017-03-14 10:29       ` Linus Walleij
2017-03-14 10:44         ` Andrzej Hajda
2017-03-15 13:45           ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).