[PATCH] staging: rtl8723bs: core: rtw_cmd: drop unneeded null test
Julia Lawall
julia.lawall at lip6.fr
Sat Apr 8 17:14:08 UTC 2017
kfree returns immediately on NULL so the tests are not needed.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
CC: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---
rtw_ap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -1860,8 +1860,7 @@ static void update_bcn_wps_ie(struct ada
pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen;
}
- if (pbackup_remainder_ie)
- kfree(pbackup_remainder_ie);
+ kfree(pbackup_remainder_ie);
/* deal with the case without set_tx_beacon_cmd() in update_beacon() */
#if defined(CONFIG_INTERRUPT_BASED_TXBCN)
More information about the devel
mailing list