Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20230202102812.453357-1-vincent.guittot@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Vincent Guittot and committed by
Rafael J. Wysocki
a29cbd76 badf1f90

+1 -1
+1 -1
tools/lib/thermal/sampling.c
··· 54 54 thermal_error_t thermal_sampling_exit(struct thermal_handler *th) 55 55 { 56 56 if (nl_unsubscribe_thermal(th->sk_sampling, th->cb_sampling, 57 - THERMAL_GENL_EVENT_GROUP_NAME)) 57 + THERMAL_GENL_SAMPLING_GROUP_NAME)) 58 58 return THERMAL_ERROR; 59 59 60 60 nl_thermal_disconnect(th->sk_sampling, th->cb_sampling);