public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sound/soc/omap/mcbsp.c: remove unnecessary null test before kfree
@ 2014-06-23 16:33 Fabian Frederick
  2014-06-24  7:48 ` Peter Ujfalusi
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-23 16:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Peter Ujfalusi, Jarkko Nikula, linux-omap

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 sound/soc/omap/mcbsp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 86c7538..68a1252 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -621,8 +621,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
 	mcbsp->reg_cache = NULL;
 	spin_unlock(&mcbsp->lock);
 
-	if (reg_cache)
-		kfree(reg_cache);
+	kfree(reg_cache);
 }
 
 /*
-- 
1.8.4.5


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

* Re: [PATCH 1/1] sound/soc/omap/mcbsp.c: remove unnecessary null test before kfree
  2014-06-23 16:33 [PATCH 1/1] sound/soc/omap/mcbsp.c: remove unnecessary null test before kfree Fabian Frederick
@ 2014-06-24  7:48 ` Peter Ujfalusi
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Ujfalusi @ 2014-06-24  7:48 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: Jarkko Nikula, linux-omap

Hi Fabian,

On 06/23/2014 07:33 PM, Fabian Frederick wrote:
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required

can you send the same patch to alsa-devel with subject:
ASoC: mcbsp:  remove unnecessary null test before kfree

You can add my:
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  sound/soc/omap/mcbsp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> index 86c7538..68a1252 100644
> --- a/sound/soc/omap/mcbsp.c
> +++ b/sound/soc/omap/mcbsp.c
> @@ -621,8 +621,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
>  	mcbsp->reg_cache = NULL;
>  	spin_unlock(&mcbsp->lock);
>  
> -	if (reg_cache)
> -		kfree(reg_cache);
> +	kfree(reg_cache);
>  }
>  
>  /*
> 


-- 
Péter

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

end of thread, other threads:[~2014-06-24  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 16:33 [PATCH 1/1] sound/soc/omap/mcbsp.c: remove unnecessary null test before kfree Fabian Frederick
2014-06-24  7:48 ` Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox