Messages in this thread Patch in this message | | | From | YueHaibing <> | Subject | [PATCH -next] staging: rtl8723bs: Remove unnecessary null check | Date | Thu, 10 Oct 2019 23:33:25 +0800 |
| |
Null check before kfree is redundant, so remove it. This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- 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
| |