aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-09-21 12:26:02 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-09 16:17:34 -0400
commita6eed752f5fb40990eb28fddb2b93258fb7e3be0 (patch)
tree8f70379f4e4d35cd6d20f49164a07cea9262049b /drivers/base
parentf59d3ee8480d30f41914cb4bed5086237e8507b0 (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>
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
223 /* Get OPP descriptor node */ 223 /* Get OPP descriptor node */
224 np = _of_get_opp_desc_node(cpu_dev); 224 np = _of_get_opp_desc_node(cpu_dev);
225 if (!np) { 225 if (!np) {
226 dev_dbg(cpu_dev, "%s: Couldn't find opp node: %ld\n", __func__, 226 dev_dbg(cpu_dev, "%s: Couldn't find cpu_dev node.\n", __func__);
227 PTR_ERR(np));
228 return -ENOENT; 227 return -ENOENT;
229 } 228 }
230 229
@@ -247,9 +246,9 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
247 /* Get OPP descriptor node */ 246 /* Get OPP descriptor node */
248 tmp_np = _of_get_opp_desc_node(tcpu_dev); 247 tmp_np = _of_get_opp_desc_node(tcpu_dev);
249 if (!tmp_np) { 248 if (!tmp_np) {
250 dev_err(tcpu_dev, "%s: Couldn't find opp node: %ld\n", 249 dev_err(tcpu_dev, "%s: Couldn't find tcpu_dev node.\n",
251 __func__, PTR_ERR(tmp_np)); 250 __func__);
252 ret = PTR_ERR(tmp_np); 251 ret = -ENOENT;
253 goto put_cpu_node; 252 goto put_cpu_node;
254 } 253 }
255 254