Commit e3aee486 authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Felipe Balbi

usb: dwc3: fix post-increment

Use pre-increment and set -ETIMEDOUT correctly.
Signed-off-by: default avatarJanusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent ce3fc8b3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment