提交 1d15ee4c 编写于 作者: S Sebastian Andrzej Siewior 提交者: 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: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b002ff6e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册