diff options
author | Janusz Dziedzic <januszx.dziedzic@linux.intel.com> | 2016-11-09 11:01:33 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 12:54:14 +0100 |
commit | e3aee48692ac063fbb568bcf36a5a0e37c62079a (patch) | |
tree | 1b8d89afd4bde8e569e4cc53567e1b56f4fa218d /drivers/usb/dwc3 | |
parent | usb: dwc3: clean TRB if STARTTRANSFER fail (diff) | |
download | linux-e3aee48692ac063fbb568bcf36a5a0e37c62079a.tar.xz linux-e3aee48692ac063fbb568bcf36a5a0e37c62079a.zip |
usb: dwc3: fix post-increment
Use pre-increment and set -ETIMEDOUT correctly.
Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 9262ef20f7c6..af9e8853d8fb 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -214,7 +214,7 @@ int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param) ret = -EINVAL; break; } - } while (timeout--); + } while (--timeout); if (!timeout) { ret = -ETIMEDOUT; |