smsc75xx: add explicit test that device is READY
[cascardo/linux.git] / drivers / net / usb / cdc-phonet.c
index 6461004..7d78669 100644 (file)
@@ -232,6 +232,7 @@ static int usbpn_open(struct net_device *dev)
                struct urb *req = usb_alloc_urb(0, GFP_KERNEL);
 
                if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD)) {
+                       usb_free_urb(req);
                        usbpn_close(dev);
                        return -ENOMEM;
                }