* [PATCH 1/1] staging: rtl8723au: Remove unnecessary null test before kfree
@ 2014-06-29 7:40 Fabian Frederick
2014-07-01 7:01 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-29 7:40 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Larry Finger, Jes Sorensen, linux-wireless
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>
---
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_,
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] staging: rtl8723au: Remove unnecessary null test before kfree
2014-06-29 7:40 [PATCH 1/1] staging: rtl8723au: Remove unnecessary null test before kfree Fabian Frederick
@ 2014-07-01 7:01 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2014-07-01 7:01 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Larry Finger, linux-wireless
Fabian Frederick <fabf@skynet.be> writes:
> 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>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-01 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29 7:40 [PATCH 1/1] staging: rtl8723au: Remove unnecessary null test before kfree Fabian Frederick
2014-07-01 7:01 ` Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.