diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-10 23:33:25 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-11 11:05:59 +0200 |
commit | 0fa79a78b1d7e671f889b41a981c229075cbfb36 (patch) | |
tree | 3d9e52c64a894f0d03a88c1f7f5b543df9023cda /drivers/staging/rtl8723bs | |
parent | 2e821be2206ca03168e35dd9fd1f77fbb9faf0f1 (diff) | |
download | linux-0fa79a78b1d7e671f889b41a981c229075cbfb36.tar.gz linux-0fa79a78b1d7e671f889b41a981c229075cbfb36.tar.bz2 linux-0fa79a78b1d7e671f889b41a981c229075cbfb36.zip |
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>
Diffstat (limited to 'drivers/staging/rtl8723bs')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index cb4c86728d26..47e984d5b7cb 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) |