Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Minghao Chi and committed by
Herbert Xu
ee74fdf0 cca80630

+2 -4
+2 -4
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c
··· 112 112 goto err_iv; 113 113 } 114 114 115 - err = pm_runtime_get_sync(ss->dev); 116 - if (err < 0) { 117 - pm_runtime_put_noidle(ss->dev); 115 + err = pm_runtime_resume_and_get(ss->dev); 116 + if (err < 0) 118 117 goto err_pm; 119 - } 120 118 err = 0; 121 119 122 120 mutex_lock(&ss->mlock);