aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2006-02-09 20:04:16 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:29:21 +0100
commit9c4be3d334808d1dedea7db0ae84759bfac8e18e (patch)
tree3071bf879319c0525c33a7586b18763956f15645 /sound
parentdbc967760b075aef3b181deda6639d73bbd0ad07 (diff)
downloadkernel_goldelico_gta04-9c4be3d334808d1dedea7db0ae84759bfac8e18e.zip
kernel_goldelico_gta04-9c4be3d334808d1dedea7db0ae84759bfac8e18e.tar.gz
kernel_goldelico_gta04-9c4be3d334808d1dedea7db0ae84759bfac8e18e.tar.bz2
[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>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/vx/vx_pcm.c7
-rw-r--r--sound/usb/usbaudio.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
index 464109e..2195e25 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 7b1b9f2..039f27d 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;
}