aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-12-04 09:41:54 +0530
committerKevin Hilman <khilman@linaro.org>2015-06-05 15:42:15 -0700
commitf9715f8642d8bd67c08b0b95098e570ca5b03df6 (patch)
treeb9906d1f57bae98797c083a15dd9842fa820e12b
parent257a06de77cd1959ed59bfa1df2500143339da3f (diff)
downloadlinux-linaro-stable-f9715f8642d8bd67c08b0b95098e570ca5b03df6.tar.gz
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> (cherry picked from commit 268ac445ee1b2b7c2806e7a21076e6d94aca1ca3) Signed-off-by: Kevin Hilman <khilman@linaro.org>
-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,
ret = get_idr(&cpufreq_idr, &cpufreq_dev->id);
if (ret) {
kfree(cpufreq_dev);
- return ERR_PTR(-EINVAL);
+ return ERR_PTR(ret);
}
snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",