HID: alps: fix error return code in alps_input_configured()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Thu, 4 Mar 2021 13:19:57 +0000 (05:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Apr 2021 10:07:16 +0000 (12:07 +0200)
commit629775f52692f73ae1a3ebdcdfb0888eaa08e35d
tree1fac6a6c85ca4848bdf96dc72c8c45f593382618
parente87fd8f564bb4dba662df02a23710373d90296ac
HID: alps: fix error return code in alps_input_configured()

[ Upstream commit fa8ba6e5dc0e78e409e503ddcfceef5dd96527f4 ]

When input_register_device() fails, no error return code is assigned.
To fix this bug, ret is assigned with -ENOENT as error return code.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-alps.c