]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 22 Jun 2020 02:40:08 +0000 (10:40 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Jul 2020 04:18:33 +0000 (14:18 +1000)
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 <dinghao.liu@zju.edu.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c

index a6abb701bfc6ec3c287fd5de20e4fad316159bd8..3665a0a2038f4419ebd2671a9b915c654f2e0f4f 100644 (file)
@@ -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;
 }