[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <wrfjzjgtsgud.fsf@ultrasam.lan.trained-monkey.org>
Date: Tue, 01 Jul 2014 09:01:14 +0200
From: Jes Sorensen <Jes.Sorensen@...hat.com>
To: Fabian Frederick <fabf@...net.be>
Cc: linux-kernel@...r.kernel.org,
Larry Finger <Larry.Finger@...inger.net>,
linux-wireless@...r.kernel.org
Subject: Re: [PATCH 1/1] staging: rtl8723au: Remove unnecessary null test before kfree
Fabian Frederick <fabf@...net.be> writes:
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required
>
> Cc: Larry Finger <Larry.Finger@...inger.net>
> Cc: Jes Sorensen <Jes.Sorensen@...hat.com>
> Cc: linux-wireless@...r.kernel.org
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
> 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 1696cb8..6af2b4a 100644
> --- a/drivers/staging/rtl8723au/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
> @@ -516,9 +516,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_,
Thanks, I applied this one to the rtl8723au tree.
Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists