mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] dmaengine: qcom: hidma_mgmt: fix autosuspend cleanup on probe failure
@ 2026-10-07 12:25 Guangshuo Li
  2026-10-13 20:49 ` Frank Li
  0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-10-07 12:25 UTC (permalink / raw)
  To: Sinan Kaya, Vinod Koul, Frank Li, Andy Shevchenko,
	linux-arm-kernel, linux-arm-msm, dmaengine, linux-kernel
  Cc: Guangshuo Li, stable

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.

Fixes: 7f8f209fd6e0 ("dmaengine: add Qualcomm Technologies HIDMA management driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] dmaengine: qcom: hidma_mgmt: fix autosuspend cleanup on probe failure
  2026-10-07 12:25 [PATCH v3] dmaengine: qcom: hidma_mgmt: fix autosuspend cleanup on probe failure Guangshuo Li
@ 2026-10-13 20:49 ` Frank Li
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-10-13 20:49 UTC (permalink / raw)
  To: Guangshuo Li
  Cc: Sinan Kaya, Vinod Koul, Frank Li, Andy Shevchenko,
	linux-arm-kernel, linux-arm-msm, dmaengine, linux-kernel, stable

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@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@nxp.com>
    Signed-off-by: Joshua Crofts <joshua.crofts1@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@intel.com>

Frank

>
> Fixes: 7f8f209fd6e0 ("dmaengine: add Qualcomm Technologies HIDMA management driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-13 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 12:25 [PATCH v3] dmaengine: qcom: hidma_mgmt: fix autosuspend cleanup on probe failure Guangshuo Li
2026-10-13 20:49 ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®