mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
crypto: sun8i-ss - Use pm_runtime_resume_and_get()
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle() error handling pattern with pm_runtime_resume_and_get(), which already does this internally. No functional change. Found by manual code inspection. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
404aac318d
commit
e13aea2afb
|
|
@ -120,12 +120,11 @@ int sun8i_ss_hash_init_tfm(struct crypto_ahash *tfm)
|
|||
memcpy(algt->fbname, crypto_ahash_driver_name(op->fallback_tfm),
|
||||
CRYPTO_MAX_ALG_NAME);
|
||||
|
||||
err = pm_runtime_get_sync(op->ss->dev);
|
||||
err = pm_runtime_resume_and_get(op->ss->dev);
|
||||
if (err < 0)
|
||||
goto error_pm;
|
||||
return 0;
|
||||
error_pm:
|
||||
pm_runtime_put_noidle(op->ss->dev);
|
||||
crypto_free_ahash(op->fallback_tfm);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user