Re: [PATCH 1/2] soundwire: qcom: fix unbalanced pm_runtime_put()

From: Vinod Koul
Date: Mon May 29 2023 - 01:20:38 EST


On 17-05-23, 18:37, Krzysztof Kozlowski wrote:
> This reverts commit 57ed510b0547 ("soundwire: qcom: use
> pm_runtime_resume_and_get()") which introduced unbalanced
> pm_runtime_put(), when device did not have runtime PM enabled.
>
> If pm_runtime_resume_and_get() failed with -EACCES, the driver continued
> execution and finally called pm_runtime_put_autosuspend(). Since
> pm_runtime_resume_and_get() drops the usage counter on every error, this
> lead to double decrement of that counter visible in certain debugfs
> actions on unattached devices (still in reset state):

Applied, thanks

--
~Vinod