public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Subject: Re: [PATCH]sgio2audio.c: clean up checking
Date: Sun, 07 Jun 2009 07:09:47 +0000	[thread overview]
Message-ID: <s5hbpp0zfic.wl%tiwai@suse.de> (raw)
In-Reply-To: <1244353048.3355.22.camel@myhost>

At Sun, 07 Jun 2009 13:37:27 +0800,
Figo.zhang wrote:
> 
> vfree() does it's own 'NULL' check,so no need for check before
> calling it.
> 
> Signed-off-by: Figo.zhang <figo1802@gmail.com>

Thanks, applied now.


Takashi

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

      reply	other threads:[~2009-06-07  7:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07  5:37 [PATCH]sgio2audio.c: clean up checking Figo.zhang
2009-06-07  7:09 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hbpp0zfic.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox