sgio2audio.c: clean up checking
PATCH 1/1 sgio2audio.c: clean up checking
vfree() does it's own 'NULL' check,so no need for check before calling it.
Signed-off-by Figo.zhang <[email protected]>
---
sound/mips/sgio2audio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
sound/mips/sgio2audio.c +1 -2
@@ -619,8 +619,7 @@ static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream,/* hw_free callback */ 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 ;return 0 ; }
Takashi Iwai
AppliedAt Sun, 07 Jun 2009 13:37:27 +0800,
Quoted 5 lines · Figo.zhang
vfree()does it's own 'NULL' check,so no need for check before calling it.Signed-off-by Figo.zhang <[email protected]>
Thanks, applied now.
Takashi
Quoted 20 lines
---
sound/mips/sgio2audio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)sound/mips/sgio2audio.c +1
-2@@ -619,8 +619,7 @@ static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream,/* hw_free callback */ 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 ;return 0 ; }