1
0
Fork 0

ALSA: PCM: Remove redundant null check before kfree

kfree on a null pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hifive-unleashed-5.1
Sachin Kamat 2012-11-21 14:36:54 +05:30 committed by Takashi Iwai
parent 87af0b80c9
commit 51d503de02
1 changed files with 1 additions and 2 deletions

View File

@ -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;