staging: rtl8723bs: Remove unnecessary null check

Null check before kfree is redundant, so remove it.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191010153325.16836-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
YueHaibing 2019-10-10 23:33:25 +08:00 committed by Greg Kroah-Hartman
parent 2e821be220
commit 0fa79a78b1

View File

@ -1121,8 +1121,7 @@ void rtw_ndev_destructor(struct net_device *ndev)
{
DBG_871X(FUNC_NDEV_FMT "\n", FUNC_NDEV_ARG(ndev));
if (ndev->ieee80211_ptr)
kfree(ndev->ieee80211_ptr);
kfree(ndev->ieee80211_ptr);
}
void rtw_dev_unload(struct adapter *padapter)