diff options
author | 2025-05-01 22:06:51 +0300 | |
---|---|---|
committer | 2025-05-05 18:20:45 +0800 | |
commit | 7d2461c7616743d62be0df8f9a5f4a6de29f119a (patch) | |
tree | 678e387e1ff52b0854ae129fd4164189df68e549 /drivers/crypto | |
parent | crypto: sun8i-ce - undo runtime PM changes during driver removal (diff) | |
download | linux-rng-7d2461c7616743d62be0df8f9a5f4a6de29f119a.tar.xz linux-rng-7d2461c7616743d62be0df8f9a5f4a6de29f119a.zip |
crypto: sun8i-ce-hash - use pm_runtime_resume_and_get()
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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c index ba13fb75c05d..bef44f350167 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c @@ -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; } |