X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sound%2Fdrivers%2Fvx%2Fvx_pcm.c;h=fdbf86571b1f3f528233b3c13537e78728a2028c;hb=e1a9c9872dd004617555dff079b357a6ffd945e9;hp=c4af84995d0544b1173b2152be2c0ab46ab09001;hpb=b7ad6d75028d021362221d9b2db19fcff995c3f8;p=~andy%2Flinux diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index c4af84995d0..fdbf86571b1 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -45,7 +45,6 @@ * - scheduled action on the stream. */ -#include #include #include #include @@ -1252,18 +1251,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 */