diff options
-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) | |||
647 | struct usbdevfs_ctrltransfer ctrl; | 647 | struct usbdevfs_ctrltransfer ctrl; |
648 | unsigned int tmo; | 648 | unsigned int tmo; |
649 | unsigned char *tbuf; | 649 | unsigned char *tbuf; |
650 | unsigned wLength; | ||
650 | int i, j, ret; | 651 | int i, j, ret; |
651 | 652 | ||
652 | if (copy_from_user(&ctrl, arg, sizeof(ctrl))) | 653 | if (copy_from_user(&ctrl, arg, sizeof(ctrl))) |
@@ -654,7 +655,8 @@ static int proc_control(struct dev_state *ps, void __user *arg) | |||
654 | ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex); | 655 | ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex); |
655 | if (ret) | 656 | if (ret) |
656 | return ret; | 657 | return ret; |
657 | if (ctrl.wLength > PAGE_SIZE) | 658 | wLength = ctrl.wLength; /* To suppress 64k PAGE_SIZE warning */ |
659 | if (wLength > PAGE_SIZE) | ||
658 | return -EINVAL; | 660 | return -EINVAL; |
659 | tbuf = (unsigned char *)__get_free_page(GFP_KERNEL); | 661 | tbuf = (unsigned char *)__get_free_page(GFP_KERNEL); |
660 | if (!tbuf) | 662 | if (!tbuf) |