]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/wusbcore/rh.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-omap-h63xx.git] / drivers / usb / wusbcore / rh.c
index 95c6fa3bf6b24e7541d2185caabdfebd8c9781a3..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;
 
@@ -326,7 +329,7 @@ static int wusbhc_rh_clear_port_feat(struct wusbhc *wusbhc, u16 feature,
 static int wusbhc_rh_get_port_status(struct wusbhc *wusbhc, u16 port_idx,
                                     u32 *_buf, u16 wLength)
 {
-       u16 *buf = (u16 *) _buf;
+       __le16 *buf = (__le16 *)_buf;
 
        if (port_idx > wusbhc->ports_max)
                return -EINVAL;