* [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
* Re: [PATCH] Input: i8042 - fix error return code in i8042_setup_aux()
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
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2020-11-23 13:55 UTC (permalink / raw)
To: Luo Meng, dmitry.torokhov, gustavoars, rajatja, linux-input
Hi,
On 11/23/20 2:34 PM, 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>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> 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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: i8042 - fix error return code in i8042_setup_aux()
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
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2020-11-25 1:46 UTC (permalink / raw)
To: Luo Meng; +Cc: gustavoars, hdegoede, rajatja, linux-input
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
^ permalink raw reply [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).