diff mbox series

Input: i8042 - fix error return code in i8042_setup_aux()

Message ID 20201123133420.4071187-1-luomeng12@huawei.com
State Accepted
Commit 855b69857830f8d918d715014f05e59a3f7491a0
Headers show
Series Input: i8042 - fix error return code in i8042_setup_aux() | expand

Commit Message

Luo Meng Nov. 23, 2020, 1:34 p.m. UTC
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(-)

Comments

Dmitry Torokhov Nov. 25, 2020, 1:46 a.m. UTC | #1
On Mon, Nov 23, 2020 at 09:34:20PM +0800, Luo Meng wrote:
> 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>


Applied, thank you.

-- 
Dmitry
diff mbox series

Patch

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;