Re: [PATCH 3/3] thermal/drivers/qcom/tsens: Disable hardware on probe failure
From: Konrad Dybcio
Date: Wed Oct 21 2026 - 06:28:10 EST
On 10/21/26 10:57 AM, Daniel Lezcano wrote:
> Hardware initialization enables TSENS interrupts before calibration and
> thermal zone and IRQ registration have completed. If calibration or
> registration fails, probe returns without disabling the hardware. Devres
> then releases any registered IRQ handlers, leaving the interrupt source
> enabled without a handler.
>
> Factor the hardware shutdown sequence out of the remove callback and
> invoke it when calibration or registration fails after successful
> initialization. Disable hardware interrupts and call the optional sensor
> disable callback before devres releases IRQ handlers and register maps.
>
> Fixes: 634e11d5b450 ("drivers: thermal: tsens: Add interrupt support")
> Closes: https://sashiko.dev/#/bug/linux-4b873699-7a0d-46e9-b768-169916c70d1d
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxxxxxxxx>
> Cc: Amit Kucheria <amitk@xxxxxxxxxx>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad