Commit a7f7c15e authored by Reto Schneider's avatar Reto Schneider Committed by Kalle Valo

rtlwifi: rtl8192cu: Free ieee80211_hw if probing fails

In case of an error, no one will use the allocated structure. Call
ieee80211_free_hw, same as in rtl_usb_disconnect.
Signed-off-by: default avatarReto Schneider <code@reto-schneider.ch>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200622132113.14508-4-code@reto-schneider.ch
parent 03128643
......@@ -1087,6 +1087,7 @@ int rtl_usb_probe(struct usb_interface *intf,
usb_put_dev(udev);
complete(&rtlpriv->firmware_loading_complete);
kfree(rtlpriv->usb_data);
ieee80211_free_hw(hw);
return -ENODEV;
}
EXPORT_SYMBOL(rtl_usb_probe);
......
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