Re: [PATCH] dmaengine: qcom-bam-dma: fix autosuspend cleanup during removal

Bartosz Golaszewski <[email protected]>
Newsgroups org.kernel.vger.dmaengine,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <CAMRc=McvRCX9jogG-qAuVnqb3=SukzTc54+iRRsojWOL_k1P3g@mail.gmail.com>
On Sat, 8 Aug 2026 13:06:42 +0200, Guangshuo Li
<[email protected]> said:
> bam_dma_probe() calls pm_runtime_use_autosuspend(), but
> bam_dma_remove() does not call the matching
> pm_runtime_dont_use_autosuspend() when removing the device.
>
> If the autosuspend delay is set to a negative value while autosuspend
> is enabled, the runtime PM core increments usage_count to prevent
> runtime suspend. Without calling pm_runtime_dont_use_autosuspend()
> during teardown, this reference is not dropped and usage_count remains
> unbalanced.
>
> Add the missing pm_runtime_dont_use_autosuspend() call before forcing
> the device into runtime suspend during removal.
>
> This issue was found by manual code inspection.
>
> Fixes: 7d2545599f5b ("dmaengine: qcom-bam-dma: Add pm_runtime support")
> Cc: [email protected]
> Signed-off-by: Guangshuo Li <[email protected]>
> ---

Reviewed-by: Bartosz Golaszewski <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.