]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: sun8i-ce-hash - use pm_runtime_resume_and_get()
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Thu, 1 May 2025 19:06:51 +0000 (22:06 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 5 May 2025 10:20:45 +0000 (18:20 +0800)
Replace pm_runtime_get_sync() usage with pm_runtime_resume_and_get() to
simplify error handling.

This is recommended in the documentation of pm_runtime_get_sync().

Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c

index ba13fb75c05d979477ef5010441d6a13487ab4b0..bef44f3501672f0a91dfb6e88c4c55fb1ecb17db 100644 (file)
@@ -65,12 +65,11 @@ int sun8i_ce_hash_init_tfm(struct crypto_ahash *tfm)
                       crypto_ahash_driver_name(op->fallback_tfm),
                       CRYPTO_MAX_ALG_NAME);
 
-       err = pm_runtime_get_sync(op->ce->dev);
+       err = pm_runtime_resume_and_get(op->ce->dev);
        if (err < 0)
                goto error_pm;
        return 0;
 error_pm:
-       pm_runtime_put_noidle(op->ce->dev);
        crypto_free_ahash(op->fallback_tfm);
        return err;
 }