Skip to content

Commit

Permalink
ALSA: PCM: Remove redundant null check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Takashi Iwai committed Nov 21, 2012
1 parent 87af0b8 commit 51d503d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 51d503d

Please sign in to comment.