From 352f145d8fce34aa75b58cca102587ba7bce4412 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Tue, 1 Jul 2014 10:11:23 +0200 Subject: [PATCH] staging: rtl8723au: Remove unnecessary null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: Larry Finger Cc: Jes Sorensen Cc: linux-wireless@vger.kernel.org Signed-off-by: Fabian Frederick Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index f44f9415a391..df1ffb375afe 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -515,9 +515,7 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter, psecnetwork = &psecuritypriv->sec_bss; if (!psecnetwork) { - if (pcmd) - kfree(pcmd); - + kfree(pcmd); res = _FAIL; RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, -- 2.30.2