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>
This commit is contained in:
		
							parent
							
								
									ce3fc8b329
								
							
						
					
					
						commit
						e3aee48692
					
				| @ -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; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user