From: Fabian Frederick Date: Tue, 1 Jul 2014 08:11:23 +0000 (+0200) Subject: staging: rtl8723au: Remove unnecessary null test before kfree X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=352f145d8fce34aa75b58cca102587ba7bce4412;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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_,