staging: rtl8723bs: os_dep: remove rtw_spt_band_free()
authorJason Yan <yanaijie@huawei.com>
Tue, 28 Apr 2020 13:31:15 +0000 (21:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 May 2020 10:28:58 +0000 (12:28 +0200)
Now that rtw_spt_band_free() is only a direct wrapper of kfree, we can
remove it and just use kfree().

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20200428133115.28072-1-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

index b037868..478e10d 100644 (file)
@@ -152,11 +152,6 @@ exit:
        return spt_band;
 }
 
-static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
-{
-       kfree(spt_band);
-}
-
 static const struct ieee80211_txrx_stypes
 rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
        [NL80211_IFTYPE_ADHOC] = {
@@ -3476,7 +3471,7 @@ void rtw_wdev_free(struct wireless_dev *wdev)
        if (!wdev)
                return;
 
-       rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
+       kfree(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
 
        wiphy_free(wdev->wiphy);