Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / usb / wusbcore / rh.c
index 3937bf6f8cefcb4fdf3a9e7ec07eb70058f335d5..9fe4246cecb98d5bb5fa2cb77ca23bd3bae90c9e 100644 (file)
@@ -100,6 +100,9 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx)
        struct wusb_port *port = wusb_port_by_idx(wusbhc, port_idx);
        struct wusb_dev *wusb_dev = port->wusb_dev;
 
+       if (wusb_dev == NULL)
+               return -ENOTCONN;
+
        port->status |= USB_PORT_STAT_RESET;
        port->change |= USB_PORT_STAT_C_RESET;