]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Staging: rtl8188eu: Fix warning of kfree check is not required.
authorElena Oat <oat.elena@gmail.com>
Mon, 3 Mar 2014 21:34:46 +0000 (23:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 22:34:12 +0000 (14:34 -0800)
This patch fixes the warning produced by checkpatch in the file
rtw_cmd.c "kfree(NULL) is safe this check is probably not required". The
patch fixes it in two places for this file.

Signed-off-by: Elena Oat <oat.elena@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c

index 0cab7152a51cdbea49c5431a5300ab050cf4b4f7..976f000d0f519a81c2e08c7a79beadded149c15f 100644 (file)
@@ -114,11 +114,8 @@ void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 
        if (pcmdpriv) {
-               if (pcmdpriv->cmd_allocated_buf)
-                       kfree(pcmdpriv->cmd_allocated_buf);
-
-               if (pcmdpriv->rsp_allocated_buf)
-                       kfree(pcmdpriv->rsp_allocated_buf);
+               kfree(pcmdpriv->cmd_allocated_buf);
+               kfree(pcmdpriv->rsp_allocated_buf);
        }
 }