aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/rndis_wlan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 9ef547d6724e..52fc647e6cb6 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2449,8 +2449,8 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
2449 set_wiphy_dev(wiphy, &usbdev->udev->dev); 2449 set_wiphy_dev(wiphy, &usbdev->udev->dev);
2450 2450
2451 if (wiphy_register(wiphy)) { 2451 if (wiphy_register(wiphy)) {
2452 wiphy_free(wiphy); 2452 retval = -ENODEV;
2453 return -ENODEV; 2453 goto fail;
2454 } 2454 }
2455 2455
2456 set_default_iw_params(usbdev); 2456 set_default_iw_params(usbdev);
@@ -2472,7 +2472,7 @@ fail:
2472 flush_workqueue(priv->workqueue); 2472 flush_workqueue(priv->workqueue);
2473 destroy_workqueue(priv->workqueue); 2473 destroy_workqueue(priv->workqueue);
2474 2474
2475 kfree(priv); 2475 wiphy_free(wiphy);
2476 return retval; 2476 return retval;
2477} 2477}
2478 2478