Commit a29cbd76 authored by Vincent Guittot's avatar Vincent Guittot Committed by Rafael J. Wysocki

tools/lib/thermal: Fix thermal_sampling_exit()

thermal_sampling_init() suscribes to THERMAL_GENL_SAMPLING_GROUP_NAME group
so thermal_sampling_exit() should unsubscribe from the same group.

Fixes: 47c4b0de ("tools/lib/thermal: Add a thermal library")
Signed-off-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20230202102812.453357-1-vincent.guittot@linaro.orgSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent badf1f90
...@@ -54,7 +54,7 @@ int thermal_sampling_fd(struct thermal_handler *th) ...@@ -54,7 +54,7 @@ int thermal_sampling_fd(struct thermal_handler *th)
thermal_error_t thermal_sampling_exit(struct thermal_handler *th) thermal_error_t thermal_sampling_exit(struct thermal_handler *th)
{ {
if (nl_unsubscribe_thermal(th->sk_sampling, th->cb_sampling, if (nl_unsubscribe_thermal(th->sk_sampling, th->cb_sampling,
THERMAL_GENL_EVENT_GROUP_NAME)) THERMAL_GENL_SAMPLING_GROUP_NAME))
return THERMAL_ERROR; return THERMAL_ERROR;
nl_thermal_disconnect(th->sk_sampling, th->cb_sampling); nl_thermal_disconnect(th->sk_sampling, th->cb_sampling);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment