aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-12-03 23:11:54 -0500
committerEduardo Valentin <edubezval@gmail.com>2014-12-08 11:08:56 -0500
commit268ac445ee1b2b7c2806e7a21076e6d94aca1ca3 (patch)
tree3531e4ba28bcd525db32f90fa3f480a0c9b0a293 /drivers/thermal
parent8e54d442fe3cdd1ffe5f563ee843b4d48e14ef6e (diff)
thermal: cpu_cooling: propagate error returned by idr_alloc()
We aren't supposed to return our own error type here. Return what we got. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/cpu_cooling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d57b8bb7d423..5c9a2efeec22 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -485,7 +485,7 @@ __cpufreq_cooling_register(struct device_node *np,
485 ret = get_idr(&cpufreq_idr, &cpufreq_dev->id); 485 ret = get_idr(&cpufreq_idr, &cpufreq_dev->id);
486 if (ret) { 486 if (ret) {
487 kfree(cpufreq_dev); 487 kfree(cpufreq_dev);
488 return ERR_PTR(-EINVAL); 488 return ERR_PTR(ret);
489 } 489 }
490 490
491 snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d", 491 snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",