All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] ALSA: PCM: Remove redundant null check before kfree
@ 2012-11-21  9:06 Sachin Kamat
  2012-11-21  9:06 ` [PATCH 2/6] ALSA: pcm: Fix return code in pcm_native.c Sachin Kamat
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-11-21  9:06 UTC (permalink / raw)
  To: alsa-devel; +Cc: patches, tiwai, broonie, sachin.kamat, lrg

kfree on a null pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Build tested and based on linux-next 20121115.
---
 sound/core/pcm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 030102c..61798f8 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -981,8 +981,7 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
 		       PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)));
 	kfree(runtime->hw_constraints.rules);
 #ifdef CONFIG_SND_PCM_XRUN_DEBUG
-	if (runtime->hwptr_log)
-		kfree(runtime->hwptr_log);
+	kfree(runtime->hwptr_log);
 #endif
 	kfree(runtime);
 	substream->runtime = NULL;
-- 
1.7.4.1

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

end of thread, other threads:[~2012-12-02  4:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21  9:06 [PATCH 1/6] ALSA: PCM: Remove redundant null check before kfree Sachin Kamat
2012-11-21  9:06 ` [PATCH 2/6] ALSA: pcm: Fix return code in pcm_native.c Sachin Kamat
2012-11-21  9:45   ` Takashi Iwai
2012-11-21  9:06 ` [PATCH 3/6] ASoC: Samsung-dma: Fix potential NULL pointer dereference Sachin Kamat
2012-12-02  4:12   ` Mark Brown
2012-11-21  9:06 ` [PATCH 4/6] ALSA: usb: Fix potential NULL pointer dereference in comm.c Sachin Kamat
2012-11-21  9:45   ` Takashi Iwai
2012-11-21  9:06 ` [PATCH 5/6] ALSA: usb-audio: Return -ENOMEM on memory alloc failure in format.c Sachin Kamat
2012-11-21  9:45   ` Takashi Iwai
2012-11-21  9:56     ` Sachin Kamat
2012-11-21  9:06 ` [PATCH 6/6] ASoC: dapm: Fix potential NULL pointer dereference Sachin Kamat
2012-11-28  4:43   ` Sachin Kamat
2012-11-28 17:28     ` Mark Brown
2012-12-02  4:14   ` Mark Brown
2012-11-21  9:44 ` [PATCH 1/6] ALSA: PCM: Remove redundant null check before kfree Takashi Iwai

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.