diff options
author | Dan Carpenter <[email protected]> | 2021-09-06 12:42:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-09-14 10:32:27 +0200 |
commit | 17956b53ebff6a490baf580a836cbd3eae94892b (patch) | |
tree | 2ad32ed1e180a6fa70902e84809f70267b6a90d2 /drivers/usb/cdns3/cdns3-gadget.c | |
parent | f5dfd98a80ff8d50cf4ae2820857d7f5a46cbab9 (diff) |
usb: gadget: r8a66597: fix a loop in set_feature()
This loop is supposed to loop until if reads something other than
CS_IDST or until it times out after 30,000 attempts. But because of
the || vs && bug, it will never time out and instead it will loop a
minimum of 30,000 times.
This bug is quite old but the code is only used in USB_DEVICE_TEST_MODE
so it probably doesn't affect regular usage.
Fixes: 96fe53ef5498 ("usb: gadget: r8a66597-udc: add support for TEST_MODE")
Cc: stable <[email protected]>
Reviewed-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/20210906094221.GA10957@kili
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.c')
0 files changed, 0 insertions, 0 deletions