* [lvc-project] [PATCH] Input: synaptics - remove unreachable code
@ 2023-03-14 12:43 Igor Artemiev
2023-03-14 14:04 ` Andi Shyti
0 siblings, 1 reply; 2+ messages in thread
From: Igor Artemiev @ 2023-03-14 12:43 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Igor Artemiev, linux-input, linux-kernel, lvc-project
The synaptics_resolution() function always returnd 0.
And there is no need to check its result.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices")
Signed-off-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
---
drivers/input/mouse/synaptics.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index fa021af8506e..4f1182bf9667 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -444,9 +444,7 @@ static int synaptics_query_hardware(struct psmouse *psmouse,
if (error)
return error;
- error = synaptics_resolution(psmouse, info);
- if (error)
- return error;
+ synaptics_resolution(psmouse, info);
return 0;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lvc-project] [PATCH] Input: synaptics - remove unreachable code
2023-03-14 12:43 [lvc-project] [PATCH] Input: synaptics - remove unreachable code Igor Artemiev
@ 2023-03-14 14:04 ` Andi Shyti
0 siblings, 0 replies; 2+ messages in thread
From: Andi Shyti @ 2023-03-14 14:04 UTC (permalink / raw)
To: Igor Artemiev; +Cc: Dmitry Torokhov, linux-input, linux-kernel, lvc-project
Hi Igor,
On Tue, Mar 14, 2023 at 03:43:36PM +0300, Igor Artemiev wrote:
> The synaptics_resolution() function always returnd 0.
> And there is no need to check its result.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices")
> Signed-off-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
> ---
> drivers/input/mouse/synaptics.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index fa021af8506e..4f1182bf9667 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -444,9 +444,7 @@ static int synaptics_query_hardware(struct psmouse *psmouse,
> if (error)
> return error;
>
> - error = synaptics_resolution(psmouse, info);
> - if (error)
> - return error;
> + synaptics_resolution(psmouse, info);
Again, please make "synaptics_resolution()" void. As it is you
are just ignoring a return value, even if you are sure it's '0'.
Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-14 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 12:43 [lvc-project] [PATCH] Input: synaptics - remove unreachable code Igor Artemiev
2023-03-14 14:04 ` Andi Shyti
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).