mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] input: synaptics-rmi4: check for non zero version logically dead code
@ 2016-12-20  9:56 Colin King
  2017-01-02  9:03 ` Benjamin Tissoires
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-12-20  9:56 UTC (permalink / raw)
  To: Dmitry Torokhov, Nick Dyer, Benjamin Tissoires, linux-input; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

version is a u8, the check for version > 0 means that version can only
be zero, so the subsequent check for version != 0 is never true and
hence is redudant code and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/input/rmi4/rmi_f34.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
index 9774dfb..c3285ce 100644
--- a/drivers/input/rmi4/rmi_f34.c
+++ b/drivers/input/rmi4/rmi_f34.c
@@ -441,8 +441,6 @@ static int rmi_f34_probe(struct rmi_function *fn)
 	/* v5 code only supported version 0, try V7 probe */
 	if (version > 0)
 		return rmi_f34v7_probe(f34);
-	else if (version != 0)
-		return -ENODEV;
 
 	f34->bl_version = 5;
 
-- 
2.10.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-02  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20  9:56 [PATCH] input: synaptics-rmi4: check for non zero version logically dead code Colin King
2017-01-02  9:03 ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®