From: Vincent Guittot Date: Thu, 2 Feb 2023 10:28:12 +0000 (+0100) Subject: tools/lib/thermal: Fix thermal_sampling_exit() X-Git-Tag: v6.6.7~3502^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a29cbd76aaf63f5493e962aa2fbaadcdc4615143;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20230202102812.453357-1-vincent.guittot@linaro.org Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki --- diff --git a/tools/lib/thermal/sampling.c b/tools/lib/thermal/sampling.c index ee818f4..7057742 100644 --- a/tools/lib/thermal/sampling.c +++ b/tools/lib/thermal/sampling.c @@ -54,7 +54,7 @@ int thermal_sampling_fd(struct thermal_handler *th) thermal_error_t thermal_sampling_exit(struct thermal_handler *th) { if (nl_unsubscribe_thermal(th->sk_sampling, th->cb_sampling, - THERMAL_GENL_EVENT_GROUP_NAME)) + THERMAL_GENL_SAMPLING_GROUP_NAME)) return THERMAL_ERROR; nl_thermal_disconnect(th->sk_sampling, th->cb_sampling);