linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Input: hil_kbd - Fix error return code in hil_dev_connect()
@ 2021-05-15  3:00 Zhen Lei
  2021-05-25  3:37 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-05-15  3:00 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: Zhen Lei

Return error code -EPERM 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>
---
 drivers/input/keyboard/hil_kbd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index bb29a7c9a1c0cf5..ca38e8e20bb5484 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 = -EPERM;
 			goto bail1;
 		}
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-25  3:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-15  3:00 [PATCH 1/1] Input: hil_kbd - Fix error return code in hil_dev_connect() Zhen Lei
2021-05-25  3:37 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).