]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: dwc3: fix post-increment
authorJanusz Dziedzic <januszx.dziedzic@linux.intel.com>
Wed, 9 Nov 2016 10:01:33 +0000 (11:01 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:14 +0000 (13:54 +0200)
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>
drivers/usb/dwc3/gadget.c

index 9262ef20f7c6bf274cf0794874d3888acd43ee62..af9e8853d8fb356192986e122dd904dcb26c71e4 100644 (file)
@@ -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;