usb: gadget: m66592-udc: forever loop in set_feature()
Subsystems (2)
PATCH 1/1 usb: gadget: m66592-udc: forever loop in set_feature()
There is an "&&" vs "||" typo here so this loops 3000 times or if we get unlucky it could loop forever.
Fixes ceaa0a6eeadf ('usb: gadget: m66592-udc: add support for TEST_MODE')
Signed-off-by Dan Carpenter <[email protected]>
drivers/usb/gadget/udc/m66592-udc.c +1 -1
@@ -1052,7 +1052,7 @@ static void set_feature(struct m66592 *m66592, struct usb_ctrlrequest *ctrl) tmp =m66592_read (m66592,M66592_INTSTS0 ) &M66592_CTSQ ;udelay (1 ); - }while (tmp !=M66592_CS_IDST || timeout-- >0 ); + }while (tmp !=M66592_CS_IDST && timeout-- >0 );if (tmp =M66592_CS_IDST ) m66592_bset(m66592,