From: Jesper Juhl Date: Thu, 9 Feb 2006 19:04:16 +0000 (+0100) Subject: [ALSA] no need to check pointers passed to vfree() for NULL X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~53777^2^2~76 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9c4be3d334808d1dedea7db0ae84759bfac8e18e;p=mirror_ubuntu-focal-kernel.git [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 Signed-off-by: Takashi Iwai --- diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 464109e421d4..2195e25087b4 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -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; } diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 7b1b9f29f377..039f27dc1f08 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -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; }