Commit 7d2461c7 authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Herbert Xu
Browse files

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: default avatarOvidiu Panait <ovidiu.panait.oss@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9334f427
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}