From: Julia Lawall Date: Sat, 8 Apr 2017 17:14:08 +0000 (+0200) Subject: staging: rtl8723bs: core: rtw_cmd: drop unneeded null test X-Git-Tag: v4.12-rc1~84^2~199 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f951e88bdc1c1f667d9237a52e2e5d76ae16cf54;p=karo-tx-linux.git staging: rtl8723bs: core: rtw_cmd: drop unneeded null test kfree returns immediately on NULL so the tests are not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Hans de Goede Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 68b750275dff..d3007c1c45e3 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -1855,8 +1855,7 @@ static void update_bcn_wps_ie(struct adapter *padapter) 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)