summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2011-04-14 11:22:32 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-29 17:24:35 -0700
commit1d15ee4cd7c9ddacfb4b517131b257d8c0d74d42 (patch)
tree913e470a78cdbeb2ba7b61f3fdd76d4251fc3307
parentb002ff6e268b6024d6927a1ce330a14ca162b6ab (diff)
usb/hcd: don't return 0 on error in usb_add_hcd()
If USB type detections fails, we run into default and return 0. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/hcd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 77a7faec8d78..10936ba9c42b 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2407,6 +2407,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
rhdev->speed = USB_SPEED_SUPER;
break;
default:
+ retval = -EINVAL;
goto err_set_rh_speed;
}