diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2009-04-21 20:48:15 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-23 00:57:20 +0400 |
commit | eb1a685e07310b5137c561e25ab738292db2c8a5 (patch) | |
tree | 9df14988358792162af7fa2a8ea3dc76b8f78742 /drivers | |
parent | 8d4d99ae89a8845a1d63b0529dd98da28dc0ff65 (diff) | |
download | linux-eb1a685e07310b5137c561e25ab738292db2c8a5.tar.xz |
rndis_wlan: free priv correctly when rndis_wext_bind fails
Private structure is allocated by wiphy_new now, so use
wiphy_free instead of kfree.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 6 |
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) set_wiphy_dev(wiphy, &usbdev->udev->dev); if (wiphy_register(wiphy)) { - wiphy_free(wiphy); - return -ENODEV; + retval = -ENODEV; + goto fail; } set_default_iw_params(usbdev); @@ -2472,7 +2472,7 @@ fail: flush_workqueue(priv->workqueue); destroy_workqueue(priv->workqueue); - kfree(priv); + wiphy_free(wiphy); return retval; } |