Skip to contentSkip to conversation

crypto: omap-aes: Fix broken pm_runtime_and_get() usage

PATCH In review Heiner Kallweit 2 participants 2 messages Dec 17, 2021 – Dec 24, 2021 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: omap-aes: Fix broken pm_runtime_and_get() usage

This fix is basically the same as 3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes"), just for the omap driver. If the return value isn't used, then pm_runtime_get_sync() has to be used for ensuring that the usage count is balanced.

Fixes 1f34cc4a8da3 ("crypto: omap-aes - Fix PM reference leak on omap-aes.c")
---
 drivers/crypto/omap-aes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/omap-aes.c +1 -1
index 9b968ac4e..a196bb8b1 100644
@@ -1302,7 +1302,7 @@ static int omap_aes_suspend(struct device *dev)
 
 static int omap_aes_resume(struct device *dev)
 {
-	pm_runtime_resume_and_get(dev);
+	pm_runtime_get_sync(dev);
 	return 0;
 }
 #endif
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 11 lines · Heiner Kallweit

This fix is basically the same as 3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes"), just for the omap driver. If the return value isn't used, then pm_runtime_get_sync() has to be used for ensuring that the usage count is balanced.

Fixes 1f34cc4a8da3 ("crypto: omap-aes - Fix PM reference leak on omap-aes.c")
---
 drivers/crypto/omap-aes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt