summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/rh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/wusbcore/rh.c')
-rw-r--r--drivers/usb/wusbcore/rh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/wusbcore/rh.c b/drivers/usb/wusbcore/rh.c
index 3937bf6..9fe4246 100644
--- a/drivers/usb/wusbcore/rh.c
+++ b/drivers/usb/wusbcore/rh.c
@@ -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;
OpenPOWER on IntegriCloud