Re: [PATCH] mfd: arizona: Fix rumtime PM imbalance on error

From: Charles Keepax
Date: Wed Apr 07 2021 - 04:59:41 EST


On Wed, Apr 07, 2021 at 01:11:49PM +0800, Dinghao Liu wrote:
> pm_runtime_get_sync() will increase the rumtime PM counter
> even it returns an error. Thus a pairing decrement is needed
> to prevent refcount leak. Fix this by replacing this API with
> pm_runtime_resume_and_get(), which will not change the runtime
> PM counter on error.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>
> ---

Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Wow, did not realise that was how that worked. Thanks for fixing
up.

Thanks,
Charles