diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2006-02-09 14:04:16 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:29:21 -0500 |
commit | 9c4be3d334808d1dedea7db0ae84759bfac8e18e (patch) | |
tree | 3071bf879319c0525c33a7586b18763956f15645 | |
parent | dbc967760b075aef3b181deda6639d73bbd0ad07 (diff) |
[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>
-rw-r--r-- | sound/drivers/vx/vx_pcm.c | 7 | ||||
-rw-r--r-- | sound/usb/usbaudio.c | 7 |
2 files changed, 6 insertions, 8 deletions
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 | |||
98 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) | 98 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) |
99 | { | 99 | { |
100 | struct snd_pcm_runtime *runtime = subs->runtime; | 100 | struct snd_pcm_runtime *runtime = subs->runtime; |
101 | if (runtime->dma_area) { | 101 | |
102 | vfree(runtime->dma_area); | 102 | vfree(runtime->dma_area); |
103 | runtime->dma_area = NULL; | 103 | runtime->dma_area = NULL; |
104 | } | ||
105 | return 0; | 104 | return 0; |
106 | } | 105 | } |
107 | 106 | ||
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 | |||
720 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) | 720 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) |
721 | { | 721 | { |
722 | struct snd_pcm_runtime *runtime = subs->runtime; | 722 | struct snd_pcm_runtime *runtime = subs->runtime; |
723 | if (runtime->dma_area) { | 723 | |
724 | vfree(runtime->dma_area); | 724 | vfree(runtime->dma_area); |
725 | runtime->dma_area = NULL; | 725 | runtime->dma_area = NULL; |
726 | } | ||
727 | return 0; | 726 | return 0; |
728 | } | 727 | } |
729 | 728 | ||