From: Sachin Kamat Date: Wed, 21 Nov 2012 09:06:54 +0000 (+0530) Subject: ALSA: PCM: Remove redundant null check before kfree X-Git-Tag: upstream/snapshot3+hdmi~5986^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51d503de0210a2b800efdedee23580011f5422c3;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: PCM: Remove redundant null check before kfree kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat Signed-off-by: Takashi Iwai --- 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;