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>
This commit is contained in:
Sebastian Andrzej Siewior 2011-04-14 11:22:32 +02:00 committed by Greg Kroah-Hartman
parent b002ff6e26
commit 1d15ee4cd7

View File

@ -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;
}