aboutsummaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorGravatar Daniel Lezcano <daniel.lezcano@linaro.org> 2023-01-23 16:27:55 +0100
committerGravatar Rafael J. Wysocki <rafael.j.wysocki@intel.com> 2023-01-25 16:40:39 +0100
commitb57d62862d171e402fca649882f0fec4e25bd312 (patch)
tree24528ee3b96edccd6eca00392d48210015b9368a /drivers/thermal
parentthermal/core: Fix unregistering netlink at thermal init time (diff)
downloadlinux-b57d62862d171e402fca649882f0fec4e25bd312.tar.gz
linux-b57d62862d171e402fca649882f0fec4e25bd312.tar.bz2
linux-b57d62862d171e402fca649882f0fec4e25bd312.zip
thermal/core: Remove unneeded ida_destroy()
As per documentation for the ida_destroy() function: "If the IDA is already empty, there is no need to call this function." The thermal framework is in the init sequence, so the ida was not yet used and consequently it is empty in case of error. There is no need to call ida_destroy(), let's remove the calls. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index e79ea015f8d3..99869e9dd68e 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1625,8 +1625,6 @@ unregister_governors:
unregister_netlink:
thermal_netlink_exit();
error:
- ida_destroy(&thermal_tz_ida);
- ida_destroy(&thermal_cdev_ida);
mutex_destroy(&thermal_list_lock);
mutex_destroy(&thermal_governor_lock);
return result;