Skip to content

Commit b57d628

Browse files
dlezcanorafaeljw
authored andcommitted
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 <[email protected]> Reviewed-by: Zhang Rui <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 58d1c9f commit b57d628

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/thermal/thermal_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,6 @@ static int __init thermal_init(void)
16251625
unregister_netlink:
16261626
thermal_netlink_exit();
16271627
error:
1628-
ida_destroy(&thermal_tz_ida);
1629-
ida_destroy(&thermal_cdev_ida);
16301628
mutex_destroy(&thermal_list_lock);
16311629
mutex_destroy(&thermal_governor_lock);
16321630
return result;

0 commit comments

Comments
 (0)