diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-07-13 06:14:33 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 08:09:47 -0400 |
commit | 7442e6db5bdd0dce4615205508301f9b22e502d6 (patch) | |
tree | 1437037da620dc9f3fc067c1ae2877cc7e43ae20 /drivers/usb | |
parent | 327b21da884fe1a29f733e41792ddd53e4a30379 (diff) |
usb: gadget: fsl_qe_udc: off by one in setup_received_handle()
The udc->eps[] array has USB_MAX_ENDPOINTS elements so > should be >=.
Fixes: 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller driver')
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_qe_udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c index 93d28cb00b76..cf8819a5c5b2 100644 --- a/drivers/usb/gadget/udc/fsl_qe_udc.c +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c | |||
@@ -2053,7 +2053,7 @@ static void setup_received_handle(struct qe_udc *udc, | |||
2053 | struct qe_ep *ep; | 2053 | struct qe_ep *ep; |
2054 | 2054 | ||
2055 | if (wValue != 0 || wLength != 0 | 2055 | if (wValue != 0 || wLength != 0 |
2056 | || pipe > USB_MAX_ENDPOINTS) | 2056 | || pipe >= USB_MAX_ENDPOINTS) |
2057 | break; | 2057 | break; |
2058 | ep = &udc->eps[pipe]; | 2058 | ep = &udc->eps[pipe]; |
2059 | 2059 | ||