crypto: omap-aes - Fix broken pm_runtime_and_get() usage
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 17 Dec 2021 09:03:30 +0000 (10:03 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Dec 2021 03:18:28 +0000 (14:18 +1100)
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")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes.c

index 9b968ac..a196bb8 100644 (file)
@@ -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