Commit ecfc7a21 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: return errors when disabling a port

this allows us to learn about a port that cannot be disabled. It's needed
for a superrobust usb_reset_device().
parent ad05da65
...@@ -756,7 +756,7 @@ static int usb_hub_port_reset(struct usb_device *hub, int port, ...@@ -756,7 +756,7 @@ static int usb_hub_port_reset(struct usb_device *hub, int port,
return -1; return -1;
} }
void usb_hub_port_disable(struct usb_device *hub, int port) int usb_hub_port_disable(struct usb_device *hub, int port)
{ {
int ret; int ret;
...@@ -764,6 +764,8 @@ void usb_hub_port_disable(struct usb_device *hub, int port) ...@@ -764,6 +764,8 @@ void usb_hub_port_disable(struct usb_device *hub, int port)
if (ret) if (ret)
dev_err(hubdev(hub), "cannot disable port %d (err = %d)\n", dev_err(hubdev(hub), "cannot disable port %d (err = %d)\n",
port + 1, ret); port + 1, ret);
return ret;
} }
/* USB 2.0 spec, 7.1.7.3 / fig 7-29: /* USB 2.0 spec, 7.1.7.3 / fig 7-29:
......
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