Re: [PATCH v2.1 1/6] thermal: core: Store zone trips table in struct thermal_zone_device

From: Daniel Lezcano
Date: Thu Feb 22 2024 - 08:38:40 EST


On 22/02/2024 14:10, Rafael J. Wysocki wrote:

[ ... ]

Index: linux-pm/drivers/thermal/thermal_of.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_of.c
+++ linux-pm/drivers/thermal/thermal_of.c
@@ -440,12 +440,10 @@ static int thermal_of_unbind(struct ther
*/
static void thermal_of_zone_unregister(struct thermal_zone_device *tz)
{
- struct thermal_trip *trips = tz->trips;
struct thermal_zone_device_ops *ops = tz->ops;
thermal_zone_device_disable(tz);
thermal_zone_device_unregister(tz);
- kfree(trips);

thermal_of_zone_register() must free the allocated trip points after registering the thermal zone.

kfree(ops);
}


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog