]> git.hungrycats.org Git - linux/commitdiff
[PATCH] USB: fix race with hub devices disconnecting while stuff is still happening...
authorGreg Kroah-Hartman <greg@kroah.com>
Mon, 8 Dec 2003 05:58:14 +0000 (21:58 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 8 Dec 2003 05:58:14 +0000 (21:58 -0800)
drivers/usb/core/hub.c

index dc12ba0c97224dea0c462ed3ea9dfc80c65e75bb..f665eadd35e7a90dc095f74fc3c4b7bcf9fe3942 100644 (file)
@@ -692,6 +692,9 @@ static int hub_port_status(struct usb_device *dev, int port,
        struct usb_hub *hub = usb_get_intfdata(dev->actconfig->interface[0]);
        int ret;
 
+       if (!hub)
+               return -ENODEV;
+
        ret = get_port_status(dev, port + 1, &hub->status->port);
        if (ret < 0)
                dev_err (hubdev (dev),