* [PATCH v2 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree
@ 2016-02-14 17:39 Bhumika Goyal
2016-02-14 17:39 ` [PATCH v2 1/2] " Bhumika Goyal
2016-02-14 17:39 ` [PATCH v2 2/2] " Bhumika Goyal
0 siblings, 2 replies; 4+ messages in thread
From: Bhumika Goyal @ 2016-02-14 17:39 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Bhumika Goyal
The function vfree tests whether the argument is NULL and returns
immediately. So NULL test is not needed before vfree. Also remove blank
line between function calls.
Changes since v1:
* Remove blank line between function calls in patch 2/2.
* Correct errors in commit messages in both the patches.
* Remove braces around if branch in 1/2.
Bhumika Goyal (2):
Staging: rtl8188eu: core: Remove NULL test before vfree
Staging: rtl8188eu: core: Remove NULL test before vfree
drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 ++----
drivers/staging/rtl8188eu/core/rtw_xmit.c | 7 ++-----
2 files changed, 4 insertions(+), 9 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] Staging: rtl8188eu: core: Remove NULL test before vfree
2016-02-14 17:39 [PATCH v2 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
@ 2016-02-14 17:39 ` Bhumika Goyal
2016-02-15 0:41 ` [Outreachy kernel] " Greg KH
2016-02-14 17:39 ` [PATCH v2 2/2] " Bhumika Goyal
1 sibling, 1 reply; 4+ messages in thread
From: Bhumika Goyal @ 2016-02-14 17:39 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Bhumika Goyal
The function vfree tests whether the argument is NULL and returns
immediately. So NULL test before vfree is not needed. Also remove braces
around if branch as they are no longer needed.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes since v1:
*Correct errors in commit message.
*Remove braces around if branch.
drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 9c2e659..a645a62 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -122,10 +122,8 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{
rtw_free_mlme_priv_ie_data(pmlmepriv);
- if (pmlmepriv) {
- if (pmlmepriv->free_bss_buf)
- vfree(pmlmepriv->free_bss_buf);
- }
+ if (pmlmepriv)
+ vfree(pmlmepriv->free_bss_buf);
}
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Outreachy kernel] [PATCH v2 1/2] Staging: rtl8188eu: core: Remove NULL test before vfree
2016-02-14 17:39 ` [PATCH v2 1/2] " Bhumika Goyal
@ 2016-02-15 0:41 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-02-15 0:41 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: outreachy-kernel
On Sun, Feb 14, 2016 at 11:09:30PM +0530, Bhumika Goyal wrote:
> The function vfree tests whether the argument is NULL and returns
> immediately. So NULL test before vfree is not needed. Also remove braces
> around if branch as they are no longer needed.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> Changes since v1:
> *Correct errors in commit message.
> *Remove braces around if branch.
You sent 2 patches with identical subject lines, I can't take that :(
Please add the filename to the subject to make it more obvious, and
unique.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] Staging: rtl8188eu: core: Remove NULL test before vfree
2016-02-14 17:39 [PATCH v2 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
2016-02-14 17:39 ` [PATCH v2 1/2] " Bhumika Goyal
@ 2016-02-14 17:39 ` Bhumika Goyal
1 sibling, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2016-02-14 17:39 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Bhumika Goyal
The function vfree tests whether the argument is NULL and returns
immediately. So NULL test is not needed before vfree. Also remove blank
line between function calls.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes since v1:
* Remove blank line between function calls.
* Correct errors in commit message.
drivers/staging/rtl8188eu/core/rtw_xmit.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index d5ce1e2..f2dd7a6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -247,11 +247,8 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitbuf++;
}
- if (pxmitpriv->pallocated_frame_buf)
- vfree(pxmitpriv->pallocated_frame_buf);
-
- if (pxmitpriv->pallocated_xmitbuf)
- vfree(pxmitpriv->pallocated_xmitbuf);
+ vfree(pxmitpriv->pallocated_frame_buf);
+ vfree(pxmitpriv->pallocated_xmitbuf);
/* free xmit extension buff */
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-15 0:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 17:39 [PATCH v2 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
2016-02-14 17:39 ` [PATCH v2 1/2] " Bhumika Goyal
2016-02-15 0:41 ` [Outreachy kernel] " Greg KH
2016-02-14 17:39 ` [PATCH v2 2/2] " Bhumika Goyal
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.