Commit 6424033a authored by Miaoqian Lin's avatar Miaoqian Lin Committed by sanglipeng
Browse files

Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe

stable inclusion
from stable-v5.10.180
commit 0d6a5c9489c8a3d434e685066119c4333476dccd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN

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



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

[ Upstream commit 5bca3688 ]

rpi_firmware_get() take reference, we need to release it in error paths
as well. Use devm_rpi_firmware_get() helper to handling the resources.
Also remove the existing rpi_firmware_put().

Fixes: 0b9f28fe ("Input: add official Raspberry Pi's touchscreen driver")
Fixes: 3b8ddff7 ("input: raspberrypi-ts: Release firmware handle when not needed")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20221223074657.810346-1-linmq006@gmail.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 140d0c21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment