Skip to content

Commit

Permalink
Input: hil_kbd - fix error return code in hil_dev_connect()
Browse files Browse the repository at this point in the history
Return error code -EINVAL rather than '0' when the combo devices are not
supported.

Fixes: fa71c60 ("Input: combine hil_kbd and hil_ptr drivers")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
Zhen Lei authored and dtor committed May 25, 2021
1 parent d12b64b commit d9b5769
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/keyboard/hil_kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv)
HIL_IDD_NUM_AXES_PER_SET(*idd)) {
printk(KERN_INFO PREFIX
"combo devices are not supported.\n");
error = -EINVAL;
goto bail1;
}

Expand Down

0 comments on commit d9b5769

Please sign in to comment.