From: Roel Kluin <roel.kluin@gmail.com>
To: chunkeey@web.de
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] ar9170: wrong test on outlen in ar9170_usb_exec_cmd() ?
Date: Sun, 26 Apr 2009 14:40:59 +0200 [thread overview]
Message-ID: <49F4565B.2000201@gmail.com> (raw)
remove redundant test: outlen is unsigned
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Maybe you want to test outlen < MAX, but what should MAX be?
diff --git a/drivers/net/wireless/ar9170/usb.c b/drivers/net/wireless/ar9170/usb.c
index fddda47..dfd39e9 100644
--- a/drivers/net/wireless/ar9170/usb.c
+++ b/drivers/net/wireless/ar9170/usb.c
@@ -350,7 +350,7 @@ static int ar9170_usb_exec_cmd(struct ar9170 *ar, enum ar9170_cmd cmd,
goto err_unbuf;
}
- if (outlen >= 0 && aru->readlen != outlen) {
+ if (aru->readlen != outlen) {
err = -EMSGSIZE;
goto err_unbuf;
}
next reply other threads:[~2009-04-26 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 12:40 Roel Kluin [this message]
2009-04-26 19:13 ` [PATCH] ar9170: wrong test on outlen in ar9170_usb_exec_cmd() ? Christian Lamparter
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=49F4565B.2000201@gmail.com \
--to=roel.kluin@gmail.com \
--cc=chunkeey@web.de \
--cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).