From: YueHaibing Date: Thu, 10 Oct 2019 15:33:25 +0000 (+0800) Subject: staging: rtl8723bs: Remove unnecessary null check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0fa79a78b1d7e671f889b41a981c229075cbfb36;p=linux.git staging: rtl8723bs: Remove unnecessary null check Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191010153325.16836-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index cb4c86728d264..47e984d5b7cba 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -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)