[PATCH -next] staging: rtl8723bs: Remove unnecessary null check

From: YueHaibing
Date: Thu Oct 10 2019 - 11:35:59 EST


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

Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 5044f73..74b097a 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1141,8 +1141,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)
--
2.7.4