Skip to contentSkip to conversation

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

PATCH Applied Luo Meng 3 participants 3 messages Nov 23, 2020 – Nov 25, 2020

Subsystems (2)
lore
Share & tools
lore

Luo Meng

author
#0 lore raw

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

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")
---
 drivers/input/serio/i8042.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/serio/i8042.c +2 -1
index 944cbb519c6d..abae23af0791 100644
@@ -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;
Signature · 1 line
2.25.4
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 7 lines · Luo Meng

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")

Thanks, patch looks good to me:

Regards,

Hans

Quoted 19 lines
---
 drivers/input/serio/i8042.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/serio/i8042.c +2 -1
index 944cbb519c6d..abae23af0791 100644
@@ -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;