From: Elena Oat Date: Mon, 3 Mar 2014 21:34:46 +0000 (+0200) Subject: Staging: rtl8188eu: Fix warning of kfree check is not required. X-Git-Tag: v3.15-rc1~139^2~583 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=73e183426f8f3c2a3e030bf63c2112f7a080ded8;p=~emulex%2Finfiniband.git Staging: rtl8188eu: Fix warning of kfree check is not required. 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 Acked-by: Paul E. McKenney Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 0cab7152a51..976f000d0f5 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -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); } }