diff options
Diffstat (limited to 'drivers/usb/host/ehci-vf.c')
-rw-r--r-- | drivers/usb/host/ehci-vf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c index 12b9db3c03..c55e622453 100644 --- a/drivers/usb/host/ehci-vf.c +++ b/drivers/usb/host/ehci-vf.c @@ -173,10 +173,10 @@ int ehci_hcd_init(int index, enum usb_init_type init, if (index >= ARRAY_SIZE(nc_reg_bases)) return -EINVAL; - if (init == USB_INIT_DEVICE) - index = 0; - if (init == USB_INIT_HOST) - index = 1; + if (init == USB_INIT_DEVICE && index == 1) + return -ENODEV; + if (init == USB_INIT_HOST && index == 0) + return -ENODEV; ehci = (struct usb_ehci *)nc_reg_bases[index]; |