From: Sebastian Andrzej Siewior Date: Thu, 14 Apr 2011 09:22:32 +0000 (+0200) Subject: usb/hcd: don't return 0 on error in usb_add_hcd() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d15ee4cd7c9ddacfb4b517131b257d8c0d74d42;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }