summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorReto Schneider <code@reto-schneider.ch>2020-06-22 15:21:13 +0200
committerKalle Valo <kvalo@codeaurora.org>2020-07-15 13:37:15 +0300
commita7f7c15e945a24fbb8ff99d3b19ab0dcd764030d (patch)
tree008e7e59e8a44174f2796faa58277105a17e2ecb /drivers/net/wireless/realtek
parent03128643eb5453a798db5770952c73dc64fcaf00 (diff)
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: Reto Schneider <code@reto-schneider.ch> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200622132113.14508-4-code@reto-schneider.ch
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 1a9fcb2697bf..d05e709536ea 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -1087,6 +1087,7 @@ error_out2:
usb_put_dev(udev);
complete(&rtlpriv->firmware_loading_complete);
kfree(rtlpriv->usb_data);
+ ieee80211_free_hw(hw);
return -ENODEV;
}
EXPORT_SYMBOL(rtl_usb_probe);