diff options
author | Sudeep Holla <Sudeep.Holla@arm.com> | 2018-01-22 09:41:07 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-02-07 05:51:41 -0500 |
commit | eb85c50c24cf3e96f9aa01fd3e6219ad36845a96 (patch) | |
tree | 76a08095d5ca5896730cf220032eed2753260315 | |
parent | 3d70671667f15f4bae260541cd91330ef20d2f2e (diff) |
cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
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>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/scpi-cpufreq.c | 5 |
1 files changed, 1 insertions, 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) | |||
197 | static void scpi_cpufreq_ready(struct cpufreq_policy *policy) | 197 | static void scpi_cpufreq_ready(struct cpufreq_policy *policy) |
198 | { | 198 | { |
199 | struct scpi_data *priv = policy->driver_data; | 199 | struct scpi_data *priv = policy->driver_data; |
200 | struct thermal_cooling_device *cdev; | ||
201 | 200 | ||
202 | cdev = of_cpufreq_cooling_register(policy); | 201 | priv->cdev = of_cpufreq_cooling_register(policy); |
203 | if (!IS_ERR(cdev)) | ||
204 | priv->cdev = cdev; | ||
205 | } | 202 | } |
206 | 203 | ||
207 | static struct cpufreq_driver scpi_cpufreq_driver = { | 204 | static struct cpufreq_driver scpi_cpufreq_driver = { |