Commit 1d15ee4c authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Greg Kroah-Hartman

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b002ff6e
...@@ -2407,6 +2407,7 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2407,6 +2407,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
rhdev->speed = USB_SPEED_SUPER; rhdev->speed = USB_SPEED_SUPER;
break; break;
default: default:
retval = -EINVAL;
goto err_set_rh_speed; goto err_set_rh_speed;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment