All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree
@ 2016-02-14 15:00 Bhumika Goyal
  2016-02-14 15:00 ` [PATCH 1/2] " Bhumika Goyal
  2016-02-14 15:00 ` [PATCH 2/2] " Bhumika Goyal
  0 siblings, 2 replies; 5+ messages in thread
From: Bhumika Goyal @ 2016-02-14 15:00 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The function vfree test whether the argument is NULL and return
immediately. SO NULL test is not needed before vfree.

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 | 3 +--
 drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] Staging: rtl8188eu: core: Remove NULL test before vfree
  2016-02-14 15:00 [PATCH 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
@ 2016-02-14 15:00 ` Bhumika Goyal
  2016-02-14 16:09   ` [Outreachy kernel] " Julia Lawall
  2016-02-14 15:00 ` [PATCH 2/2] " Bhumika Goyal
  1 sibling, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2016-02-14 15:00 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The function vfree test whether the argument is NULL and return
immediately. SO NULL test is not needed before vfree.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 9c2e659..d9b9bf3 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -123,8 +123,7 @@ 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);
+		vfree(pmlmepriv->free_bss_buf);
 	}
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] Staging: rtl8188eu: core: Remove NULL test before vfree
  2016-02-14 15:00 [PATCH 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
  2016-02-14 15:00 ` [PATCH 1/2] " Bhumika Goyal
@ 2016-02-14 15:00 ` Bhumika Goyal
  2016-02-14 16:07   ` [Outreachy kernel] " Julia Lawall
  1 sibling, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2016-02-14 15:00 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The function vfree test whether the argument is NULL and return
immediately. SO NULL test is not needed before vfree.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index d5ce1e2..2a419459 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -247,11 +247,9 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 		pxmitbuf++;
 	}
 
-	if (pxmitpriv->pallocated_frame_buf)
-		vfree(pxmitpriv->pallocated_frame_buf);
+	vfree(pxmitpriv->pallocated_frame_buf);
 
-	if (pxmitpriv->pallocated_xmitbuf)
-		vfree(pxmitpriv->pallocated_xmitbuf);
+	vfree(pxmitpriv->pallocated_xmitbuf);
 
 	/*  free xmit extension buff */
 	pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] Staging: rtl8188eu: core: Remove NULL test before vfree
  2016-02-14 15:00 ` [PATCH 2/2] " Bhumika Goyal
@ 2016-02-14 16:07   ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-02-14 16:07 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel



On Sun, 14 Feb 2016, Bhumika Goyal wrote:

> The function vfree test whether the argument is NULL and return
> immediately. SO NULL test is not needed before vfree.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> index d5ce1e2..2a419459 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> @@ -247,11 +247,9 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
>  		pxmitbuf++;
>  	}
>  
> -	if (pxmitpriv->pallocated_frame_buf)
> -		vfree(pxmitpriv->pallocated_frame_buf);
> +	vfree(pxmitpriv->pallocated_frame_buf);
>  
> -	if (pxmitpriv->pallocated_xmitbuf)
> -		vfree(pxmitpriv->pallocated_xmitbuf);
> +	vfree(pxmitpriv->pallocated_xmitbuf);

It's a minor issue, but maybe the blank line isn't needed between the 
calls anymore either.

julia

>  
>  	/*  free xmit extension buff */
>  	pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0268938371b2973ed55cf58c884abc5b0ce6e2bb.1455461125.git.bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/2] Staging: rtl8188eu: core: Remove NULL test before vfree
  2016-02-14 15:00 ` [PATCH 1/2] " Bhumika Goyal
@ 2016-02-14 16:09   ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-02-14 16:09 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Sun, 14 Feb 2016, Bhumika Goyal wrote:

> The function vfree test whether the argument is NULL and return
> immediately. SO NULL test is not needed before vfree.

test -> tests, return -> returns, SO -> So.

> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> index 9c2e659..d9b9bf3 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> @@ -123,8 +123,7 @@ 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);
> +		vfree(pmlmepriv->free_bss_buf);
>  	}

Check patch should have warned about the braces around the if branch no 
longer being needed.  They should be removed as well.

julia

>  }
>  
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/c2c521e2570272a1749cef362817e6231000530e.1455461125.git.bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-14 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 15:00 [PATCH 0/2] Staging: rtl8188eu: core: Remove NULL test before vfree Bhumika Goyal
2016-02-14 15:00 ` [PATCH 1/2] " Bhumika Goyal
2016-02-14 16:09   ` [Outreachy kernel] " Julia Lawall
2016-02-14 15:00 ` [PATCH 2/2] " Bhumika Goyal
2016-02-14 16:07   ` [Outreachy kernel] " Julia Lawall

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.