Re: [PATCH] slimbus: ngd: Fix runtime PM leak in qcom_slim_ngd_xfer_msg_sync()
From: Srinivas Kandagatla
Date: Fri Sep 18 2026 - 02:33:08 EST
On 9/17/26 4:25 PM, Wentao Liang wrote:
> The successful transfer path returns 0 without dropping the runtime PM
> usage counter taken by pm_runtime_get_sync(). The error paths all jump
> to pm_put, which releases the reference, but a completed transfer keeps
> it forever.
>
What is the exact issue that you are seeing on your device?
Is this AI generated code?
Was this patch tested on the device?
--srini
> Fall through to pm_put on success so the reference is always released.
>
> Fixes: 917809e2280bb ("slimbus: ngd: Add qcom SLIMBus NGD driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/slimbus/qcom-ngd-ctrl.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 1ed6be6e85d2..be5640f45d7c 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -937,7 +937,6 @@ static int qcom_slim_ngd_xfer_msg_sync(struct slim_controller *ctrl,
> ret = -ETIMEDOUT;
> goto pm_put;
> }
> - return 0;
>
> pm_put:
> pm_runtime_put(ctrl->dev);