diff options
| author | Andrew Morton <[email protected]> | 2008-03-12 20:32:24 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2008-04-25 04:16:41 +0000 |
| commit | ff66e3ce3524125106be3ff18104ecde0849b85c (patch) | |
| tree | 2dc39e7adc09c02a83c5e2a16d87788c4c52c913 /drivers/usb/core/devio.c | |
| parent | USB: cypress_m8: Speed handling (diff) | |
| download | kernel-ff66e3ce3524125106be3ff18104ecde0849b85c.tar.gz kernel-ff66e3ce3524125106be3ff18104ecde0849b85c.zip | |
drivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZE
drivers/usb/core/devio.c: In function 'proc_control':
drivers/usb/core/devio.c:657: warning: comparison is always false due to limited range of data type
Cc: Alan Stern <[email protected]>
Cc: Pete Zaitcev <[email protected]>
Cc: Oliver Neukum <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/devio.c')
| -rw-r--r-- | drivers/usb/core/devio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index ae94176c64e4..039ba23cc8b6 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -647,6 +647,7 @@ static int proc_control(struct dev_state *ps, void __user *arg) struct usbdevfs_ctrltransfer ctrl; unsigned int tmo; unsigned char *tbuf; + unsigned wLength; int i, j, ret; if (copy_from_user(&ctrl, arg, sizeof(ctrl))) @@ -654,7 +655,8 @@ static int proc_control(struct dev_state *ps, void __user *arg) ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex); if (ret) return ret; - if (ctrl.wLength > PAGE_SIZE) + wLength = ctrl.wLength; /* To suppress 64k PAGE_SIZE warning */ + if (wLength > PAGE_SIZE) return -EINVAL; tbuf = (unsigned char *)__get_free_page(GFP_KERNEL); if (!tbuf) |
