Skip to content

Commit

Permalink
usb: gadget: m66592-udc: forever loop in set_feature()
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Dan Carpenter authored and Felipe Balbi committed Jul 30, 2015
1 parent 1c99cab commit 5feb5d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/udc/m66592-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5feb5d2

Please sign in to comment.