From 5c3a8a661e1bd9d7063485ac2d2ccb512c447129 Mon Sep 17 00:00:00 2001 From: Dinghao Liu Date: Mon, 22 Jun 2020 10:40:08 +0800 Subject: crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a corresponding decrement is needed on the error handling path to keep the counter balanced. Fix this by adding the missed function call. Signed-off-by: Dinghao Liu Signed-off-by: Herbert Xu --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/crypto/allwinner') diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index a6abb701bfc6..3665a0a2038f 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -358,6 +358,7 @@ int sun8i_ce_cipher_init(struct crypto_tfm *tfm) return 0; error_pm: + pm_runtime_put_noidle(op->ce->dev); crypto_free_sync_skcipher(op->fallback_tfm); return err; } -- cgit v1.2.3