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

HID: alps: fix error return code in alps_input_configured()

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>

authored by

Jia-Ju Bai and committed by
Jiri Kosina
fa8ba6e5 9a0b44fb

+1
+1
drivers/hid/hid-alps.c
··· 761 761 762 762 if (input_register_device(data->input2)) { 763 763 input_free_device(input2); 764 + ret = -ENOENT; 764 765 goto exit; 765 766 } 766 767 }