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: 3948f0e0c9 ('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>
This commit is contained in:
Dan Carpenter 2016-07-13 13:14:33 +03:00 committed by Felipe Balbi
parent 327b21da88
commit 7442e6db5b
1 changed files with 1 additions and 1 deletions

View File

@ -2053,7 +2053,7 @@ static void setup_received_handle(struct qe_udc *udc,
struct qe_ep *ep;
if (wValue != 0 || wLength != 0
|| pipe > USB_MAX_ENDPOINTS)
|| pipe >= USB_MAX_ENDPOINTS)
break;
ep = &udc->eps[pipe];