staging: rtl8723au: Remove unnecessary null test before kfree
authorFabian Frederick <fabf@skynet.be>
Tue, 1 Jul 2014 08:11:23 +0000 (10:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 22:56:37 +0000 (15:56 -0700)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c

index f44f9415a391f6c61a910108598e303d9bc6eb72..df1ffb375afe5cb2204a12d0e61f5ea686adbf2d 100644 (file)
@@ -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_,