* [PATCH] ar9170usb: unsigned is always greater than 0
@ 2009-06-02 22:33 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-06-02 22:33 UTC (permalink / raw)
To: chunkeey; +Cc: linux-wireless, akpm
outlen is unsigned so always greater than 0.
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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-02 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 22:33 [PATCH] ar9170usb: unsigned is always greater than 0 Roel Kluin
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).