From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-pm@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
Date: Mon, 22 Jan 2018 14:41:07 +0000 [thread overview]
Message-ID: <1516632067-9584-1-git-send-email-sudeep.holla@arm.com> (raw)
In-Reply-To: <20180122104823.GA25283@mwanda>
Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
leads to the following static checker warning:
drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
warn: 'cdev' isn't an ERR_PTR
of_cpufreq_cooling_register() returns NULL on error. This patch removes
the incorrect IS_ERR check on the returned pointer.
Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/cpufreq/scpi-cpufreq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
index 247fcbfa4cb5..efe32cbefa06 100644
--- a/drivers/cpufreq/scpi-cpufreq.c
+++ b/drivers/cpufreq/scpi-cpufreq.c
@@ -197,11 +197,8 @@ static int scpi_cpufreq_exit(struct cpufreq_policy *policy)
static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
{
struct scpi_data *priv = policy->driver_data;
- struct thermal_cooling_device *cdev;
- cdev = of_cpufreq_cooling_register(policy);
- if (!IS_ERR(cdev))
- priv->cdev = cdev;
+ priv->cdev = of_cpufreq_cooling_register(policy);
}
static struct cpufreq_driver scpi_cpufreq_driver = {
--
2.7.4
next prev parent reply other threads:[~2018-01-22 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 10:48 [bug report] cpufreq: scpi: remove arm_big_little dependency Dan Carpenter
2018-01-22 14:39 ` Sudeep Holla
2018-01-22 14:41 ` Sudeep Holla [this message]
2018-01-23 2:41 ` [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Viresh Kumar
2018-02-08 10:06 ` Rafael J. Wysocki
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=1516632067-9584-1-git-send-email-sudeep.holla@arm.com \
--to=sudeep.holla@arm.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.org \
/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 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).