linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] staging: r8188eu: core: remove null check before vfree
@ 2021-08-29 17:00 Saurav Girepunje
  2021-08-29 17:13 ` Kari Argillander
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Saurav Girepunje @ 2021-08-29 17:00 UTC (permalink / raw)
  To: Larry.Finger, phil, gregkh, fabioaiuto83, straube.linux,
	ross.schm.dev, saurav.girepunje, linux-staging, linux-kernel
  Cc: saurav.girepunje

Remove NULL check. NULL check before freeing function is not needed.
Correct the indentation.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---

ChangeLog V4:
- Add Change log below --- line

ChangeLog V3:
- Add change log.

ChangeLog V2:
- Correct the indentation.

 drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
index f6dffed53a60..c3600cb1790a 100644
--- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
@@ -155,9 +155,8 @@ u32	_rtw_free_sta_priv(struct	sta_priv *pstapriv)
 		spin_unlock_bh(&pstapriv->sta_hash_lock);
 		/*===============================*/

-		if (pstapriv->pallocated_stainfo_buf)
-			vfree(pstapriv->pallocated_stainfo_buf);
-		}
+		vfree(pstapriv->pallocated_stainfo_buf);
+	}

 	return _SUCCESS;
 }
--
2.32.0


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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-29 17:00 [PATCH v4] staging: r8188eu: core: remove null check before vfree Saurav Girepunje
@ 2021-08-29 17:13 ` Kari Argillander
  2021-08-30 11:23   ` Dan Carpenter
  2021-08-30 11:25 ` Dan Carpenter
  2021-08-30 12:09 ` Michael Straube
  2 siblings, 1 reply; 7+ messages in thread
From: Kari Argillander @ 2021-08-29 17:13 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: Larry.Finger, phil, gregkh, fabioaiuto83, straube.linux,
	ross.schm.dev, linux-staging, linux-kernel, saurav.girepunje

On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote:
> Remove NULL check. NULL check before freeing function is not needed.
> Correct the indentation.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
> 
> ChangeLog V4:
> - Add Change log below --- line
> 
> ChangeLog V3:
> - Add change log.
> 
> ChangeLog V2:
> - Correct the indentation.

You need "---" here also. So everything what is between

---
here
---

will be ignored when you apply patch. This is good place to write
changelog, if you have tested this with real hardware, if you have any
guestions about your own implementation etc.

> 
>  drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> index f6dffed53a60..c3600cb1790a 100644
> --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> @@ -155,9 +155,8 @@ u32	_rtw_free_sta_priv(struct	sta_priv *pstapriv)
>  		spin_unlock_bh(&pstapriv->sta_hash_lock);
>  		/*===============================*/
> 
> -		if (pstapriv->pallocated_stainfo_buf)
> -			vfree(pstapriv->pallocated_stainfo_buf);
> -		}
> +		vfree(pstapriv->pallocated_stainfo_buf);
> +	}
> 
>  	return _SUCCESS;
>  }
> --
> 2.32.0
> 

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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-29 17:13 ` Kari Argillander
@ 2021-08-30 11:23   ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2021-08-30 11:23 UTC (permalink / raw)
  To: Kari Argillander
  Cc: Saurav Girepunje, Larry.Finger, phil, gregkh, fabioaiuto83,
	straube.linux, ross.schm.dev, linux-staging, linux-kernel,
	saurav.girepunje

On Sun, Aug 29, 2021 at 08:13:51PM +0300, Kari Argillander wrote:
> On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote:
> > Remove NULL check. NULL check before freeing function is not needed.
> > Correct the indentation.
> > 
> > Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> > ---
> > 
> > ChangeLog V4:
> > - Add Change log below --- line
> > 
> > ChangeLog V3:
> > - Add change log.
> > 
> > ChangeLog V2:
> > - Correct the indentation.
> 
> You need "---" here also.
> 

No.  It works fine.  I applied it myself with `git am` just to be 100%
sure in case I was missing something.

regards,
dan carpenter


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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-29 17:00 [PATCH v4] staging: r8188eu: core: remove null check before vfree Saurav Girepunje
  2021-08-29 17:13 ` Kari Argillander
@ 2021-08-30 11:25 ` Dan Carpenter
  2021-09-04  6:00   ` SAURAV GIREPUNJE
  2021-08-30 12:09 ` Michael Straube
  2 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2021-08-30 11:25 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: Larry.Finger, phil, gregkh, fabioaiuto83, straube.linux,
	ross.schm.dev, linux-staging, linux-kernel, saurav.girepunje

On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote:
> Remove NULL check. NULL check before freeing function is not needed.
> Correct the indentation.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---

Looks good.  Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-29 17:00 [PATCH v4] staging: r8188eu: core: remove null check before vfree Saurav Girepunje
  2021-08-29 17:13 ` Kari Argillander
  2021-08-30 11:25 ` Dan Carpenter
@ 2021-08-30 12:09 ` Michael Straube
  2021-09-04  5:58   ` SAURAV GIREPUNJE
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Straube @ 2021-08-30 12:09 UTC (permalink / raw)
  To: Saurav Girepunje, Larry.Finger, phil, gregkh, fabioaiuto83,
	ross.schm.dev, linux-staging, linux-kernel
  Cc: saurav.girepunje

On 8/29/21 19:00, Saurav Girepunje wrote:
> Remove NULL check. NULL check before freeing function is not needed.
> Correct the indentation.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
> 

Acked-by: Michael Straube <straube.linux@gmail.com>

Thanks,
Michael

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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-30 12:09 ` Michael Straube
@ 2021-09-04  5:58   ` SAURAV GIREPUNJE
  0 siblings, 0 replies; 7+ messages in thread
From: SAURAV GIREPUNJE @ 2021-09-04  5:58 UTC (permalink / raw)
  To: Michael Straube
  Cc: Larry.Finger, phil, gregkh, fabioaiuto83, ross.schm.dev,
	linux-staging, linux-kernel, saurav.girepunje

On 30 Aug 2021 14:09, Michael Straube wrote:
> On 8/29/21 19:00, Saurav Girepunje wrote:
> > Remove NULL check. NULL check before freeing function is not needed.
> > Correct the indentation.
> >
> > Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> > ---
> >
>
> Acked-by: Michael Straube <straube.linux@gmail.com>
>
> Thanks,
> Michael


Thanks for Review Michael


Saurav

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

* Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree
  2021-08-30 11:25 ` Dan Carpenter
@ 2021-09-04  6:00   ` SAURAV GIREPUNJE
  0 siblings, 0 replies; 7+ messages in thread
From: SAURAV GIREPUNJE @ 2021-09-04  6:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Larry.Finger, phil, gregkh, fabioaiuto83, straube.linux,
	ross.schm.dev, linux-staging, linux-kernel, saurav.girepunje

On 30 Aug 2021 14:25, Dan Carpenter wrote:
> On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote:
> > Remove NULL check. NULL check before freeing function is not needed.
> > Correct the indentation.
> >
> > Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> > ---
>
> Looks good.  Thanks!
>
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> regards,
> dan carpenter
>

Thanks for review Dan,


Saurav

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

end of thread, other threads:[~2021-09-04  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 17:00 [PATCH v4] staging: r8188eu: core: remove null check before vfree Saurav Girepunje
2021-08-29 17:13 ` Kari Argillander
2021-08-30 11:23   ` Dan Carpenter
2021-08-30 11:25 ` Dan Carpenter
2021-09-04  6:00   ` SAURAV GIREPUNJE
2021-08-30 12:09 ` Michael Straube
2021-09-04  5:58   ` SAURAV GIREPUNJE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).