summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGabriel A. Devenyi <ace@staticwave.ca>2005-11-12 16:00:46 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-18 13:31:00 -0500
commitc5b42f343d19d0a04782db0dde5b128dd282f95c (patch)
treeec0b45fac9f38dcc6b6066efbfea7b04450060e7 /drivers
parentcbf7c42b727826770a44c0a10ef3663da08e64bc (diff)
downloadop-kernel-dev-c5b42f343d19d0a04782db0dde5b128dd282f95c.zip
op-kernel-dev-c5b42f343d19d0a04782db0dde5b128dd282f95c.tar.gz
[PATCH] drivers/net/wireless/hermes.c unsigned int comparision
hermas_bap_pread, hermes_bap_pwrite, and hermes_bap_pwrite_pad all have a parameter "len" that is declared unsigned, but checked for a value less than zero. Auditing the callers, it is possible for len to be passed a negative value, so len should be an int. Thanks to LinuxICC (http://linuxicc.sf.net) Signed-off-by: Gabriel A. Devenyi <ace@staticwave.ca> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/hermes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c
index 579480d..346c6fe 100644
--- a/drivers/net/wireless/hermes.c
+++ b/drivers/net/wireless/hermes.c
@@ -398,7 +398,7 @@ static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset)
*
* Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware
*/
-int hermes_bap_pread(hermes_t *hw, int bap, void *buf, unsigned len,
+int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len,
u16 id, u16 offset)
{
int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;
@@ -424,7 +424,7 @@ int hermes_bap_pread(hermes_t *hw, int bap, void *buf, unsigned len,
*
* Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware
*/
-int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, unsigned len,
+int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len,
u16 id, u16 offset)
{
int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;
@@ -450,7 +450,7 @@ int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, unsigned len,
*
* Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware
*/
-int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, unsigned len,
+int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, int len,
u16 id, u16 offset)
{
int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;
OpenPOWER on IntegriCloud