提交 de24dade 编写于 作者: H Heiner Kallweit 提交者: Zheng Zengkai

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

stable inclusion
from stable-v5.10.94
commit 2031e0246e459cea7a01b342b5e4b87de8fc090c
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2031e0246e459cea7a01b342b5e4b87de8fc090c

--------------------------------

commit c2aec59b upstream.

This fix is basically the same as 3d6b6613 ("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: 1f34cc4a ("crypto: omap-aes - Fix PM reference leak on omap-aes.c")
Cc: stable@vger.kernel.org
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 6a6ea5d0
...@@ -1302,7 +1302,7 @@ static int omap_aes_suspend(struct device *dev) ...@@ -1302,7 +1302,7 @@ static int omap_aes_suspend(struct device *dev)
static int omap_aes_resume(struct device *dev) static int omap_aes_resume(struct device *dev)
{ {
pm_runtime_resume_and_get(dev); pm_runtime_get_sync(dev);
return 0; return 0;
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册