linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: i8042 - fix error return code in i8042_setup_aux()
@ 2020-11-23 13:34 Luo Meng
  2020-11-23 13:55 ` Hans de Goede
  2020-11-25  1:46 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: Luo Meng @ 2020-11-23 13:34 UTC (permalink / raw)
  To: dmitry.torokhov, gustavoars, hdegoede, rajatja, linux-input, luomeng12

Fix to return a negative error code from the error handling case
instead of 0 in function i8042_setup_aux(), as done elsewhere in this
function.

Fixes: f81134163fc7 ("Input: i8042 - use platform_driver_probe")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Luo Meng <luomeng12@huawei.com>
---
 drivers/input/serio/i8042.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 944cbb519c6d..abae23af0791 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1471,7 +1471,8 @@ static int __init i8042_setup_aux(void)
 	if (error)
 		goto err_free_ports;
 
-	if (aux_enable())
+	error = aux_enable();
+	if (error)
 		goto err_free_irq;
 
 	i8042_aux_irq_registered = true;
-- 
2.25.4


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

end of thread, other threads:[~2020-11-25  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 13:34 [PATCH] Input: i8042 - fix error return code in i8042_setup_aux() Luo Meng
2020-11-23 13:55 ` Hans de Goede
2020-11-25  1:46 ` 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).