]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/staging/usbip/stub_dev.c
staging: usbip: fix memory leak
[net-next-2.6.git] / drivers / staging / usbip / stub_dev.c
index b6b753a493469c4c2a7067eb8a3a0542bf9f39c1..b186b5fed2b96b7973388cd337dfce6f5cafc66d 100644 (file)
@@ -427,11 +427,11 @@ static int stub_probe(struct usb_interface *interface,
 
 
        if (busid_priv->status == STUB_BUSID_ALLOC) {
-               busid_priv->interf_count++;
                sdev = busid_priv->sdev;
                if (!sdev)
                        return -ENODEV;
 
+               busid_priv->interf_count++;
                dev_info(&interface->dev,
                 "USB/IP Stub: register a new interface "
                 "(bus %u dev %u ifn %u)\n", udev->bus->busnum, udev->devnum,