* [PATCH]sgio2audio.c: clean up checking
@ 2009-06-07 5:37 Figo.zhang
2009-06-07 7:09 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Figo.zhang @ 2009-06-07 5:37 UTC (permalink / raw)
To: linux-sound
vfree() does it's own 'NULL' check,so no need for check before
calling it.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH]sgio2audio.c: clean up checking
2009-06-07 5:37 [PATCH]sgio2audio.c: clean up checking Figo.zhang
@ 2009-06-07 7:09 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-06-07 7:09 UTC (permalink / raw)
To: linux-sound
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;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-07 7:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-07 5:37 [PATCH]sgio2audio.c: clean up checking Figo.zhang
2009-06-07 7:09 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox