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: ceaa0a6eea
('usb: gadget: m66592-udc: add support for TEST_MODE')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:

committed by
Felipe Balbi

parent
1c99cabfc9
commit
5feb5d2003
@@ -1052,7 +1052,7 @@ static void set_feature(struct m66592 *m66592, struct usb_ctrlrequest *ctrl)
|
|||||||
tmp = m66592_read(m66592, M66592_INTSTS0) &
|
tmp = m66592_read(m66592, M66592_INTSTS0) &
|
||||||
M66592_CTSQ;
|
M66592_CTSQ;
|
||||||
udelay(1);
|
udelay(1);
|
||||||
} while (tmp != M66592_CS_IDST || timeout-- > 0);
|
} while (tmp != M66592_CS_IDST && timeout-- > 0);
|
||||||
|
|
||||||
if (tmp == M66592_CS_IDST)
|
if (tmp == M66592_CS_IDST)
|
||||||
m66592_bset(m66592,
|
m66592_bset(m66592,
|
||||||
|
Reference in New Issue
Block a user