summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuo Meng <luomeng12@huawei.com>2020-11-24 17:45:23 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-11 13:25:04 +0100
commit5b27463cea05d69a56c26135558bdd57bcabbe52 (patch)
tree0afc2ceab2d27cfaf56b8eb61e3a6d59be403d0b
parentc40329943ab411fb2581018751c51caffd003916 (diff)
downloadlinux-stable-5b27463cea05d69a56c26135558bdd57bcabbe52.tar.gz
linux-stable-5b27463cea05d69a56c26135558bdd57bcabbe52.tar.bz2
linux-stable-5b27463cea05d69a56c26135558bdd57bcabbe52.zip
Input: i8042 - fix error return code in i8042_setup_aux()
commit 855b69857830f8d918d715014f05e59a3f7491a0 upstream. 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> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201123133420.4071187-1-luomeng12@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/input/serio/i8042.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index fef3b4064f18..c60593c8d2be 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1472,7 +1472,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;