diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-01-23 18:27:54 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-01-25 18:40:39 +0300 |
commit | 58d1c9fd0e859912ae322d24aa0baedc9030b8ed (patch) | |
tree | 71eab9fa5147edb45b541172243728972a61a270 /drivers/thermal/thermal_core.c | |
parent | 47e3f00074c27661268674d832f743f1940ae17c (diff) | |
download | linux-58d1c9fd0e859912ae322d24aa0baedc9030b8ed.tar.xz |
thermal/core: Fix unregistering netlink at thermal init time
The thermal subsystem initialization miss an netlink unregistering
function in the error. Add it.
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/thermal_core.c')
-rw-r--r-- | drivers/thermal/thermal_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d77c1c45ba88..e79ea015f8d3 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1607,7 +1607,7 @@ static int __init thermal_init(void) result = thermal_register_governors(); if (result) - goto error; + goto unregister_netlink; result = class_register(&thermal_class); if (result) @@ -1622,6 +1622,8 @@ static int __init thermal_init(void) unregister_governors: thermal_unregister_governors(); +unregister_netlink: + thermal_netlink_exit(); error: ida_destroy(&thermal_tz_ida); ida_destroy(&thermal_cdev_ida); |