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>
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 77a7fae..10936ba 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2407,6 +2407,7 @@
rhdev->speed = USB_SPEED_SUPER;
break;
default:
+ retval = -EINVAL;
goto err_set_rh_speed;
}