Commit ee74fdf0 authored by Minghao Chi's avatar Minghao Chi Committed by Herbert Xu

crypto: sun8i-ss - using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent cca80630
......@@ -112,11 +112,9 @@ int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src,
goto err_iv;
}
err = pm_runtime_get_sync(ss->dev);
if (err < 0) {
pm_runtime_put_noidle(ss->dev);
err = pm_runtime_resume_and_get(ss->dev);
if (err < 0)
goto err_pm;
}
err = 0;
mutex_lock(&ss->mlock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment