summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-05-24 11:52:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-14 16:56:38 +0200
commit201b975c164398dfb0875e834529c303c95bc54e (patch)
tree7fa9051672ef8f080e9ae8ce2fd62560521bca12 /drivers/input
parent000c70680d2ffcde948e963d6b953b3c097257e8 (diff)
Input: hil_kbd - fix error return code in hil_dev_connect()
[ Upstream commit d9b576917a1d0efa293801a264150a1b37691617 ] Return error code -EINVAL rather than '0' when the combo devices are not supported. Fixes: fa71c605c2bb ("Input: combine hil_kbd and hil_ptr drivers") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210515030053.6824-1-thunder.leizhen@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/hil_kbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index bb29a7c9a1c0..54afb38601b9 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -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;
}