From 1d15ee4cd7c9ddacfb4b517131b257d8c0d74d42 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 14 Apr 2011 11:22:32 +0200 Subject: [PATCH] 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hcd.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1