Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;