projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a0b44f
)
HID: alps: fix error return code in alps_input_configured()
author
Jia-Ju Bai
<baijiaju1990@gmail.com>
Thu, 4 Mar 2021 13:19:57 +0000
(
05:19
-0800)
committer
Jiri Kosina
<jkosina@suse.cz>
Mon, 8 Mar 2021 10:33:49 +0000
(11:33 +0100)
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>
drivers/hid/hid-alps.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-alps.c
b/drivers/hid/hid-alps.c
index
3feaece
..
6b66593
100644
(file)
--- a/
drivers/hid/hid-alps.c
+++ b/
drivers/hid/hid-alps.c
@@
-761,6
+761,7
@@
static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
if (input_register_device(data->input2)) {
input_free_device(input2);
+ ret = -ENOENT;
goto exit;
}
}