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

From: Daniel Lezcano

Date: Sun Apr 12 2026 - 05:35:53 EST


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