cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
Commit343a8d17fa
(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:343a8d17fa
(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>
This commit is contained in:
parent
3d70671667
commit
eb85c50c24
|
@ -197,11 +197,8 @@ static int scpi_cpufreq_exit(struct cpufreq_policy *policy)
|
||||||
static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
|
static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct scpi_data *priv = policy->driver_data;
|
struct scpi_data *priv = policy->driver_data;
|
||||||
struct thermal_cooling_device *cdev;
|
|
||||||
|
|
||||||
cdev = of_cpufreq_cooling_register(policy);
|
priv->cdev = of_cpufreq_cooling_register(policy);
|
||||||
if (!IS_ERR(cdev))
|
|
||||||
priv->cdev = cdev;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cpufreq_driver scpi_cpufreq_driver = {
|
static struct cpufreq_driver scpi_cpufreq_driver = {
|
||||||
|
|
Loading…
Reference in New Issue