Hello Viresh, On Fri, Nov 28, 2014 at 03:14:05PM +0530, Viresh Kumar wrote: > We aren't supposed to return our own error type here. Return what we got. > OK.. > Signed-off-by: Viresh Kumar > --- > drivers/thermal/cpu_cooling.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > index bb11dd4..964586f 100644 > --- a/drivers/thermal/cpu_cooling.c > +++ b/drivers/thermal/cpu_cooling.c > @@ -477,7 +477,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(cpufreq_dev->id); cpufreq_dev is an invalid object here. Maybe you want to use ret in your patch? > } > > snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d", > -- > 2.0.3.693.g996b0fd >