提交 ad0b0822 编写于 作者: F Figo.zhang 提交者: Takashi Iwai

ALSA: sgio2audio.c: clean up checking

vfree() does it's own 'NULL' check,so no need for check before
calling it.
Signed-off-by: NFigo.zhang <figo1802@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 13be1bf1
...@@ -619,7 +619,6 @@ static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -619,7 +619,6 @@ static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream,
/* hw_free callback */ /* hw_free callback */
static int snd_sgio2audio_pcm_hw_free(struct snd_pcm_substream *substream) static int snd_sgio2audio_pcm_hw_free(struct snd_pcm_substream *substream)
{ {
if (substream->runtime->dma_area)
vfree(substream->runtime->dma_area); vfree(substream->runtime->dma_area);
substream->runtime->dma_area = NULL; substream->runtime->dma_area = NULL;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册