From: Colin King <colin.king@canonical.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Nick Dyer <nick@shmanahar.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] input: synaptics-rmi4: check for non zero version logically dead code
Date: Tue, 20 Dec 2016 09:56:49 +0000 [thread overview]
Message-ID: <20161220095649.7674-1-colin.king@canonical.com> (raw)
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
next reply other threads:[~2016-12-20 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 9:56 Colin King [this message]
2017-01-02 9:03 ` Benjamin Tissoires
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161220095649.7674-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®