linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()
@ 2014-07-10  5:55 Anil Belur
  2014-07-10  5:55 ` [PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c " Anil Belur
  2014-07-10  6:59 ` [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c " Anil Shashikumar Belur
  0 siblings, 2 replies; 3+ messages in thread
From: Anil Belur @ 2014-07-10  5:55 UTC (permalink / raw)
  To: Larry.Finger, Jes.Sorensen, gregkh
  Cc: linux-wireless, devel, linux-kernel, Anil Belur

From: Anil Belur <askb23@gmail.com>

- as kfree() internally check for NULL, additional check it not
  required.

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/rtl8723au/core/rtw_ap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index c8700b3..8714ae3 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -1270,8 +1270,7 @@ static void update_bcn_wps_ie(struct rtw_adapter *padapter)
 		pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen;
 	}
 
-	if (pbackup_remainder_ie)
-		kfree(pbackup_remainder_ie);
+	kfree(pbackup_remainder_ie);
 }
 
 static void update_bcn_p2p_ie(struct rtw_adapter *padapter)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-10  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10  5:55 [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree() Anil Belur
2014-07-10  5:55 ` [PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c " Anil Belur
2014-07-10  6:59 ` [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c " Anil Shashikumar Belur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).