aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-09-21 19:26:02 +0300
committerAlex Shi <alex.shi@linaro.org>2016-04-01 13:24:08 +0800
commitb40ddfff431576ec3de0a0c12125d3682ad78a10 (patch)
tree25dc8c81e33760ddd154a5fc29bd21e51fb3defd /drivers/base
parent3f306736fdde9164d2a00c0f19178dec1c049252 (diff)
PM / OPP: passing NULL to PTR_ERR()
The code was using PTR_ERR(NULL) which causes a static checker warning. I have fixed up the printks and changed the return to -ENOENT. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit a6eed752f5fb40990eb28fddb2b93258fb7e3be0) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/opp/cpu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
index 3d946b508a13..7654c5606307 100644
--- a/drivers/base/power/opp/cpu.c
+++ b/drivers/base/power/opp/cpu.c
@@ -223,8 +223,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
/* Get OPP descriptor node */
np = _of_get_opp_desc_node(cpu_dev);
if (!np) {
- dev_dbg(cpu_dev, "%s: Couldn't find opp node: %ld\n", __func__,
- PTR_ERR(np));
+ dev_dbg(cpu_dev, "%s: Couldn't find cpu_dev node.\n", __func__);
return -ENOENT;
}
@@ -247,9 +246,9 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
/* Get OPP descriptor node */
tmp_np = _of_get_opp_desc_node(tcpu_dev);
if (!tmp_np) {
- dev_err(tcpu_dev, "%s: Couldn't find opp node: %ld\n",
- __func__, PTR_ERR(tmp_np));
- ret = PTR_ERR(tmp_np);
+ dev_err(tcpu_dev, "%s: Couldn't find tcpu_dev node.\n",
+ __func__);
+ ret = -ENOENT;
goto put_cpu_node;
}