ALSA: sgio2audio.c: clean up checking

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 12:04 pm

Gitweb:     http://git.kernel.org/linus/ad0b0822f98ef547e2461ce463e4233bad7848a8
Commit:     ad0b0822f98ef547e2461ce463e4233bad7848a8
Parent:     13be1bf1467e3186a4a9d1b1276cc4bd31e472ea
Author:     Figo.zhang <figo1802@gmail.com>
AuthorDate: Sun Jun 7 13:37:27 2009 +0800
Committer:  Takashi Iwai <tiwai@suse.de>
CommitDate: Sun Jun 7 09:08:43 2009 +0200

    ALSA: 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 <figo1802@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/mips/sgio2audio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c
index 66f3b48..e497525 100644
--- a/sound/mips/sgio2audio.c
+++ b/sound/mips/sgio2audio.c
@@ -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;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ALSA: sgio2audio.c: clean up checking, Linux Kernel Mailing ..., (Fri Jun 12, 12:04 pm)