Skip to content

Commit 5feb5d2

Browse files
Dan CarpenterFelipe Balbi
authored andcommitted
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: ceaa0a6 ('usb: gadget: m66592-udc: add support for TEST_MODE') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 1c99cab commit 5feb5d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/udc/m66592-udc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ static void set_feature(struct m66592 *m66592, struct usb_ctrlrequest *ctrl)
10521052
tmp = m66592_read(m66592, M66592_INTSTS0) &
10531053
M66592_CTSQ;
10541054
udelay(1);
1055-
} while (tmp != M66592_CS_IDST || timeout-- > 0);
1055+
} while (tmp != M66592_CS_IDST && timeout-- > 0);
10561056

10571057
if (tmp == M66592_CS_IDST)
10581058
m66592_bset(m66592,

0 commit comments

Comments
 (0)