Skip to content

Commit 5c3a8a6

Browse files
dinghaoliuherbertx
authored andcommitted
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 <dinghao.liu@zju.edu.cn> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent f949070 commit 5c3a8a6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ int sun8i_ce_cipher_init(struct crypto_tfm *tfm)
358358

359359
return 0;
360360
error_pm:
361+
pm_runtime_put_noidle(op->ce->dev);
361362
crypto_free_sync_skcipher(op->fallback_tfm);
362363
return err;
363364
}

0 commit comments

Comments
 (0)