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

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")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Heiner Kallweit and committed by
Herbert Xu
c2aec59b ace76606

+1 -1
+1 -1
drivers/crypto/omap-aes.c
··· 1302 1302 1303 1303 static int omap_aes_resume(struct device *dev) 1304 1304 { 1305 - pm_runtime_resume_and_get(dev); 1305 + pm_runtime_get_sync(dev); 1306 1306 return 0; 1307 1307 } 1308 1308 #endif