[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: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
dbc967760b
commit
9c4be3d334
2 changed files with 6 additions and 8 deletions
|
@ -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)
|
static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
|
||||||
{
|
{
|
||||||
struct snd_pcm_runtime *runtime = subs->runtime;
|
struct snd_pcm_runtime *runtime = subs->runtime;
|
||||||
if (runtime->dma_area) {
|
|
||||||
vfree(runtime->dma_area);
|
vfree(runtime->dma_area);
|
||||||
runtime->dma_area = NULL;
|
runtime->dma_area = NULL;
|
||||||
}
|
|
||||||
return 0;
|
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)
|
static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
|
||||||
{
|
{
|
||||||
struct snd_pcm_runtime *runtime = subs->runtime;
|
struct snd_pcm_runtime *runtime = subs->runtime;
|
||||||
if (runtime->dma_area) {
|
|
||||||
vfree(runtime->dma_area);
|
vfree(runtime->dma_area);
|
||||||
runtime->dma_area = NULL;
|
runtime->dma_area = NULL;
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue