diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/usb.c | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/common/usb.c b/common/usb.c index 9502f3903..52e5964c7 100644 --- a/common/usb.c +++ b/common/usb.c @@ -126,10 +126,15 @@ int usb_init(void)   */  int usb_stop(void)  { -	asynch_allowed=1; -	usb_started = 0; -	usb_hub_reset(); -	return usb_lowlevel_stop(); +	int res = 0; + +	if (usb_started) { +		asynch_allowed = 1; +		usb_started = 0; +		usb_hub_reset(); +		res = usb_lowlevel_stop(); +	} +	return res;  }  /* |