Commit eb1a685e authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by John W. Linville

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: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8d4d99ae
...@@ -2449,8 +2449,8 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2449,8 +2449,8 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
set_wiphy_dev(wiphy, &usbdev->udev->dev); set_wiphy_dev(wiphy, &usbdev->udev->dev);
if (wiphy_register(wiphy)) { if (wiphy_register(wiphy)) {
wiphy_free(wiphy); retval = -ENODEV;
return -ENODEV; goto fail;
} }
set_default_iw_params(usbdev); set_default_iw_params(usbdev);
...@@ -2472,7 +2472,7 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2472,7 +2472,7 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
flush_workqueue(priv->workqueue); flush_workqueue(priv->workqueue);
destroy_workqueue(priv->workqueue); destroy_workqueue(priv->workqueue);
kfree(priv); wiphy_free(wiphy);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment