crypto: sun8i-ce - using the pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync and pm_runtime_put_noidle. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
00278564a6
commit
7433d2fda2
@ -54,11 +54,9 @@ static int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wa
|
||||
goto err_dst;
|
||||
}
|
||||
|
||||
err = pm_runtime_get_sync(ce->dev);
|
||||
if (err < 0) {
|
||||
pm_runtime_put_noidle(ce->dev);
|
||||
err = pm_runtime_resume_and_get(ce->dev);
|
||||
if (err < 0)
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
mutex_lock(&ce->rnglock);
|
||||
chan = &ce->chanlist[flow];
|
||||
|
Loading…
Reference in New Issue
Block a user