[PATCH 1/2] thermal/drivers/imx: Fix thermal zone leak on probe error path

Daniel Lezcano daniel.lezcano at oss.qualcomm.com
Sun Apr 12 02:35:35 PDT 2026


On 4/12/26 02:58, Frank Li wrote:
> On Sun, Apr 12, 2026 at 03:03:03AM +0800, Felix Gu wrote:
>> If pm_runtime_resume_and_get() fails after the thermal zone has been
>> registered, the probe error path cleans up runtime PM but skips
>> thermal_zone_device_unregister(), leaking the thermal zone device.
>>
>> Move thermal_zone_device_unregister() into disable_runtime_pm so all
> 
> Use devm_thermal_of_zone_register() to fix this problem

+1



More information about the linux-arm-kernel mailing list