Input: stmfts - fix reference leak in stmfts_input_open
authorZheng Yongjun <zhengyongjun3@huawei.com>
Mon, 21 Mar 2022 04:56:38 +0000 (21:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 07:14:32 +0000 (09:14 +0200)
commit8c015cd524424e79b31270bd3dbdac9612c6f7db
tree71db97cd96d8490a658b3e0c41c960968a1ffd2a
parentbb83a744bc671804016e23861a892e9db2aee73f
Input: stmfts - fix reference leak in stmfts_input_open

[ Upstream commit 26623eea0da3476446909af96c980768df07bbd9 ]

pm_runtime_get_sync() will increment pm usage counter even it
failed. Forgetting to call pm_runtime_put_noidle will result
in reference leak in stmfts_input_open, so we should fix it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20220317131604.53538-1-zhengyongjun3@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/stmfts.c