Re: [PATCH] soc: qcom: smem: fix hwspinlock resource leak in probe error paths
From: Konrad Dybcio
Date: Wed Oct 29 2025 - 05:14:09 EST
On 10/29/25 3:27 AM, Haotian Zhang wrote:
> The hwspinlock acquired via hwspin_lock_request_specific() is not
> released on several error paths. This results in resource leakage
> when probe fails.
>
> Switch to devm_hwspin_lock_request_specific() to automatically
> handle cleanup on probe failure. Remove the manual hwspin_lock_free()
> in qcom_smem_remove() as devm handles it automatically.
>
> Fixes: 20bb6c9de1b7 ("soc: qcom: smem: map only partitions used by local HOST")
> Signed-off-by: Haotian Zhang <vulab@xxxxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad