Skip to content

Commit

Permalink
usb/hcd: don't return 0 on error in usb_add_hcd()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Andrzej Siewior authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent b002ff6 commit 1d15ee4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1d15ee4

Please sign in to comment.