提交 e3aee486 编写于 作者: J Janusz Dziedzic 提交者: Felipe Balbi

usb: dwc3: fix post-increment

Use pre-increment and set -ETIMEDOUT correctly.
Signed-off-by: NJanusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册