linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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