Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c4be3d3 authored by Jesper Juhl's avatar Jesper Juhl Committed by Jaroslav Kysela
Browse files

[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: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent dbc96776
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;
	}
	return 0;
}

+3 −4
Original line number Diff line number Diff line
@@ -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;
	}
	return 0;
}