diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2021-03-19 21:24:23 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2021-04-15 13:21:16 +0200 |
commit | 9aa80ab2c0ba67ce3281aee604b543293f71390d (patch) | |
tree | c7878d5c646710d8f9be06b580eb9a809f175695 /drivers/thermal/cpuidle_cooling.c | |
parent | thermal/core: Fix memory leak in the error path (diff) | |
download | linux-9aa80ab2c0ba67ce3281aee604b543293f71390d.tar.xz linux-9aa80ab2c0ba67ce3281aee604b543293f71390d.zip |
thermal/drivers/devfreq_cooling: Fix wrong return on error path
The following error is reported by kbuild:
smatch warnings:
drivers/thermal/devfreq_cooling.c:433 of_devfreq_cooling_register_power() warn: passing zero to 'ERR_PTR'
Fix the error code by the setting the 'err' variable instead of 'cdev'.
Fixes: f8d354e821b2 ("thermal/drivers/devfreq_cooling: Use device name instead of auto-numbering")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210319202424.890968-1-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal/cpuidle_cooling.c')
0 files changed, 0 insertions, 0 deletions