Skip to content

Commit fa8ba6e

Browse files
XidianGeneralJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jia-Ju Bai <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 9a0b44f commit fa8ba6e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/hid/hid-alps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
761761

762762
if (input_register_device(data->input2)) {
763763
input_free_device(input2);
764+
ret = -ENOENT;
764765
goto exit;
765766
}
766767
}

0 commit comments

Comments
 (0)