[PATCH v3] dmaengine: qcom: hidma_mgmt: fix autosuspend cleanup on probe failure

Frank Li Frank.li at oss.nxp.com
Tue Oct 13 13:49:41 PDT 2026


On Wed, Oct 07, 2026 at 08:25:34PM +0800, Guangshuo Li wrote:
> hidma_mgmt_probe() calls pm_runtime_use_autosuspend() during probe, but
> the probe failure path does not call the matching
> pm_runtime_dont_use_autosuspend() before disabling runtime PM.
>
> Add the missing pm_runtime_dont_use_autosuspend() call to the probe
> failure path before pm_runtime_disable() so that the autosuspend
> setting is properly undone during cleanup.
>
> This issue was found by manual code inspection.

This patch is not needed after

commit d1706f9da9f40dffe8621cc0ee03b847f41f1d6d
Author: Joshua Crofts <joshua.crofts1 at gmail.com>
Date:   Sat Sep 19 10:24:28 2026 +0200

    PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()

    Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit() to
    ensure autosuspend is disabled on driver teardown.

    Suggested-by: Frank Li <Frank.Li at nxp.com>
    Signed-off-by: Joshua Crofts <joshua.crofts1 at gmail.com>
    Link: https://patch.msgid.link/20260919-move-dont-use-autosuspend-v1-1-f6e2d1315c23@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>

Frank

>
> Fixes: 7f8f209fd6e0 ("dmaengine: add Qualcomm Technologies HIDMA management driver")
> Cc: stable at vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244 at gmail.com>
> ---
> v3:
>   - Add the missing changelog.
>
> v2:
>   - Keep pm_runtime_enable() and explicitly add the missing
>     pm_runtime_dont_use_autosuspend() call in the probe failure path
>     instead of switching to devm_pm_runtime_enable().
>   - Update the commit message to match the actual change.
>
>  drivers/dma/qcom/hidma_mgmt.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
> index 4805ce390ffa..d8c56af5882d 100644
> --- a/drivers/dma/qcom/hidma_mgmt.c
> +++ b/drivers/dma/qcom/hidma_mgmt.c
> @@ -310,6 +310,7 @@ static int hidma_mgmt_probe(struct platform_device *pdev)
>  	return 0;
>  out:
>  	pm_runtime_put_sync_suspend(&pdev->dev);
> +	pm_runtime_dont_use_autosuspend(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  	return rc;
>  }
> --
> 2.43.0
>



More information about the linux-arm-kernel mailing list