From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: gregkh@linuxfoundation.org, wsa-dev@sang-engineering.com,
bhaktipriya96@gmail.com, tj@kernel.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Senna Tschudin <peter.senna@gmail.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] usb: misc: remove unnecessary code
Date: Thu, 16 Feb 2017 15:25:44 -0600 [thread overview]
Message-ID: <20170216212544.GA4566@embeddedgus> (raw)
'val' is an unsigned variable, and less-than-zero comparison of an unsigned
variable is never true.
Addresses-Coverity-ID: 1230256
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/usb/misc/lvstest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index 7717651..c7c2104 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -222,7 +222,7 @@ static ssize_t u1_timeout_store(struct device *dev,
return ret;
}
- if (val < 0 || val > 127)
+ if (val > 127)
return -EINVAL;
ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8),
--
2.5.0
next reply other threads:[~2017-02-16 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 21:25 Gustavo A. R. Silva [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-20 23:28 [PATCH] usb: misc: remove unnecessary code Gustavo A. R. Silva
2017-02-21 22:11 ` Peter Senna Tschudin
2017-02-22 5:35 ` Gustavo A. R. Silva
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=20170216212544.GA4566@embeddedgus \
--to=garsilva@embeddedor.com \
--cc=bhaktipriya96@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=tj@kernel.org \
--cc=wsa-dev@sang-engineering.com \
/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