Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 268ac445 authored by Viresh Kumar's avatar Viresh Kumar Committed by Eduardo Valentin
Browse files

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 8e54d442
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",