aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanusz Dziedzic2016-11-09 11:01:33 +0100
committerFelipe Balbi2016-11-18 13:54:14 +0200
commite3aee48692ac063fbb568bcf36a5a0e37c62079a (patch)
tree1b8d89afd4bde8e569e4cc53567e1b56f4fa218d
parentce3fc8b32994e16f69912c982823105aafead7a6 (diff)
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>
-rw-r--r--drivers/usb/dwc3/gadget.c2
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;