linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL
@ 2016-05-18 10:37 Dan Carpenter
  2016-05-18 10:57 ` Chanwoo Choi
  2016-05-25 12:34 ` Chanwoo Choi
  0 siblings, 2 replies; 22+ messages in thread
From: Dan Carpenter @ 2016-05-18 10:37 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
	linux-pm, linux-samsung-soc, kernel-janitors

The platform_get_resource() function returns NULL on error, it never
returns error pointers.

Fixes: 0179a913875a ('PM / devfreq: event: Add new Exynos NoC probe driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
index 6b6a5f3..03b35d5 100644
--- a/drivers/devfreq/event/exynos-nocp.c
+++ b/drivers/devfreq/event/exynos-nocp.c
@@ -220,8 +220,8 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev,
 
 	/* Maps the memory mapped IO to control nocp register */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (IS_ERR(res))
-		return PTR_ERR(res);
+	if (!res)
+		return -ENXIO;
 
 	base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(base))

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

end of thread, other threads:[~2016-06-01 11:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 10:37 [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL Dan Carpenter
2016-05-18 10:57 ` Chanwoo Choi
2016-05-25 12:34 ` Chanwoo Choi
2016-05-25 15:11   ` Julia Lawall
2016-05-26  6:39     ` Dan Carpenter
2016-05-26  6:45     ` [patch v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check Dan Carpenter
2016-05-26  8:12       ` Chanwoo Choi
2016-05-26 10:02         ` Dan Carpenter
2016-05-26 10:16           ` Chanwoo Choi
2016-05-26 10:51             ` Dan Carpenter
2016-05-26 10:57               ` Chanwoo Choi
2016-05-26 11:01                 ` Chanwoo Choi
2016-05-26 11:56         ` Dan Carpenter
2016-05-26 13:46           ` Chanwoo Choi
2016-05-26 13:54             ` Julia Lawall
2016-05-26 13:56             ` Dan Carpenter
2016-05-26 14:10               ` Chanwoo Choi
2016-05-26 14:15                 ` Julia Lawall
2016-05-26 16:06                 ` Dan Carpenter
2016-05-26 11:13       ` Julia Lawall
2016-06-01 10:25       ` MyungJoo Ham
2016-06-01 11:33         ` Chanwoo Choi

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).