Skip to content

Commit

Permalink
Input: i8042 - fix error return code in i8042_setup_aux()
Browse files Browse the repository at this point in the history
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: f811341 ("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>
  • Loading branch information
Luo Meng authored and Dmitry Torokhov committed Nov 25, 2020
1 parent fa248db commit 855b698
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 855b698

Please sign in to comment.