提交 9c4be3d3 编写于 作者: J Jesper Juhl 提交者: Jaroslav Kysela

[ALSA] no need to check pointers passed to vfree() for NULL

Modules: Digigram VX core,USB generic driver

There's no need to check pointers passed to vfree() for NULL.
Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 dbc96776
......@@ -98,10 +98,9 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t s
static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
{
struct snd_pcm_runtime *runtime = subs->runtime;
if (runtime->dma_area) {
vfree(runtime->dma_area);
runtime->dma_area = NULL;
}
vfree(runtime->dma_area);
runtime->dma_area = NULL;
return 0;
}
......
......@@ -720,10 +720,9 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t s
static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
{
struct snd_pcm_runtime *runtime = subs->runtime;
if (runtime->dma_area) {
vfree(runtime->dma_area);
runtime->dma_area = NULL;
}
vfree(runtime->dma_area);
runtime->dma_area = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册