All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init
@ 2020-06-22  2:40 Dinghao Liu
  2020-07-03  4:47   ` Herbert Xu
  0 siblings, 1 reply; 11+ messages in thread
From: Dinghao Liu @ 2020-06-22  2:40 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Corentin Labbe, Herbert Xu, David S. Miller, Maxime Ripard,
	Chen-Yu Tsai, Mauro Carvalho Chehab, Eric Biggers, YueHaibing,
	linux-crypto, linux-arm-kernel, linux-kernel

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a corresponding decrement is
needed on the error handling path to keep the counter balanced.

Fix this by adding the missed function call.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index a6abb701bfc6..3665a0a2038f 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -358,6 +358,7 @@ int sun8i_ce_cipher_init(struct crypto_tfm *tfm)
 
 	return 0;
 error_pm:
+	pm_runtime_put_noidle(op->ce->dev);
 	crypto_free_sync_skcipher(op->fallback_tfm);
 	return err;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init
@ 2020-06-22 17:50 Markus Elfring
  2020-06-23 13:44 ` Maxime Ripard
  0 siblings, 1 reply; 11+ messages in thread
From: Markus Elfring @ 2020-06-22 17:50 UTC (permalink / raw)
  To: Dinghao Liu, linux-arm-kernel, linux-crypto
  Cc: Aditya Pakki, Navid Emamdoost, Kangjie Lu, Qiushi Wu,
	linux-kernel, YueHaibing, Maxime Ripard, Mauro Carvalho Chehab,
	Herbert Xu, Eric Biggers, David S. Miller, Corentin Labbe,
	Chen-Yu Tsai

> Fix this by …

Please replace the beginning of this sentence with the tag “Fixes”.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=625d3449788f85569096780592549d0340e9c0c7#n183

Regards,
Markus

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-03  4:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22  2:40 [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init Dinghao Liu
2020-07-03  4:47 ` Herbert Xu
2020-07-03  4:47   ` Herbert Xu
2020-06-22 17:50 Markus Elfring
2020-06-23 13:44 ` Maxime Ripard
2020-06-23 15:00   ` Markus Elfring
2020-06-23 15:00     ` Markus Elfring
2020-06-23 16:56     ` Maxime Ripard
2020-06-23 16:56       ` Maxime Ripard
2020-06-23 18:12       ` Markus Elfring
2020-06-23 18:12         ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.