aboutsummaryrefslogtreecommitdiff
path: root/sound/drivers/vx/vx_pcm.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
commite9ffb3d7ec94083a44a8721681391beca2ffd68c (patch)
tree6768ab487b3f44c2a4995ee61307e47760ca9b88 /sound/drivers/vx/vx_pcm.c
parent8b9411014e6f18a883c18b38f41338dbd53fddea (diff)
parente9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'sound/drivers/vx/vx_pcm.c')
-rw-r--r--sound/drivers/vx/vx_pcm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
index c4af84995d0..7e65a103fbb 100644
--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -1252,18 +1252,15 @@ static int vx_init_audio_io(struct vx_core *chip)
chip->audio_info = rmh.Stat[1];
/* allocate pipes */
- chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL);
+ chip->playback_pipes = kcalloc(chip->audio_outs, sizeof(struct vx_pipe *), GFP_KERNEL);
if (!chip->playback_pipes)
return -ENOMEM;
- chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL);
+ chip->capture_pipes = kcalloc(chip->audio_ins, sizeof(struct vx_pipe *), GFP_KERNEL);
if (!chip->capture_pipes) {
kfree(chip->playback_pipes);
return -ENOMEM;
}
- memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs);
- memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins);
-
preferred = chip->ibl.size;
chip->ibl.size = 0;
vx_set_ibl(chip, &chip->ibl); /* query the info */