All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL
Date: Wed, 18 May 2016 10:37:07 +0000	[thread overview]
Message-ID: <20160518103707.GA9436@mwanda> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL
Date: Wed, 18 May 2016 13:37:07 +0300	[thread overview]
Message-ID: <20160518103707.GA9436@mwanda> (raw)

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

             reply	other threads:[~2016-05-18 10:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 10:37 Dan Carpenter [this message]
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-18 10:57   ` Chanwoo Choi
2016-05-25 12:34 ` Chanwoo Choi
2016-05-25 12:34   ` Chanwoo Choi
2016-05-25 15:11   ` Julia Lawall
2016-05-25 15:11     ` Julia Lawall
2016-05-26  6:39     ` Dan Carpenter
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  6:45       ` Dan Carpenter
2016-05-26  8:12       ` Chanwoo Choi
2016-05-26  8:12         ` Chanwoo Choi
2016-05-26 10:02         ` Dan Carpenter
2016-05-26 10:02           ` Dan Carpenter
2016-05-26 10:16           ` Chanwoo Choi
2016-05-26 10:16             ` Chanwoo Choi
2016-05-26 10:51             ` Dan Carpenter
2016-05-26 10:51               ` Dan Carpenter
2016-05-26 10:57               ` Chanwoo Choi
2016-05-26 10:57                 ` Chanwoo Choi
2016-05-26 11:01                 ` Chanwoo Choi
2016-05-26 11:01                   ` Chanwoo Choi
2016-05-26 11:56         ` Dan Carpenter
2016-05-26 11:56           ` Dan Carpenter
2016-05-26 13:46           ` Chanwoo Choi
2016-05-26 13:46             ` Chanwoo Choi
2016-05-26 13:54             ` Julia Lawall
2016-05-26 13:54               ` Julia Lawall
2016-05-26 13:56             ` Dan Carpenter
2016-05-26 13:56               ` Dan Carpenter
2016-05-26 14:10               ` Chanwoo Choi
2016-05-26 14:10                 ` Chanwoo Choi
2016-05-26 14:15                 ` Julia Lawall
2016-05-26 14:15                   ` Julia Lawall
2016-05-26 16:06                 ` Dan Carpenter
2016-05-26 16:06                   ` Dan Carpenter
2016-05-26 11:13       ` Julia Lawall
2016-05-26 11:13         ` Julia Lawall
2016-06-01 10:25       ` MyungJoo Ham
2016-06-01 10:25         ` MyungJoo Ham
2016-06-01 11:33         ` Chanwoo Choi
2016-06-01 11:33           ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160518103707.GA9436@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=cw00.choi@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.