Re: [PATCH -next 1/7] crypto: sun4i-ss - Fix PM reference leak when pm_runtime_get_sync() fails

From: Herbert Xu
Date: Fri Apr 16 2021 - 07:32:01 EST


On Thu, Apr 08, 2021 at 03:18:31PM +0800, Shixin Liu wrote:
> pm_runtime_get_sync will increment pm usage counter even it failed.
> Forgetting to putting operation will result in reference leak here.
> Fix it by replacing it with pm_runtime_resume_and_get to keep usage
> counter balanced.
>
> Signed-off-by: Shixin Liu <liushixin2@xxxxxxxxxx>
> ---
> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 2 +-
> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 2 +-
> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c | 2 +-
> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)

All applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt