diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
commit | 8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch) | |
tree | be59573c0af3617d0cd8a7d61f0ed119e58b1156 /sound/drivers/vx/vx_pcm.c | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'sound/drivers/vx/vx_pcm.c')
-rw-r--r-- | sound/drivers/vx/vx_pcm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index c4af84995d05..7e65a103fbb2 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) | |||
1252 | chip->audio_info = rmh.Stat[1]; | 1252 | chip->audio_info = rmh.Stat[1]; |
1253 | 1253 | ||
1254 | /* allocate pipes */ | 1254 | /* allocate pipes */ |
1255 | chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); | 1255 | chip->playback_pipes = kcalloc(chip->audio_outs, sizeof(struct vx_pipe *), GFP_KERNEL); |
1256 | if (!chip->playback_pipes) | 1256 | if (!chip->playback_pipes) |
1257 | return -ENOMEM; | 1257 | return -ENOMEM; |
1258 | chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); | 1258 | chip->capture_pipes = kcalloc(chip->audio_ins, sizeof(struct vx_pipe *), GFP_KERNEL); |
1259 | if (!chip->capture_pipes) { | 1259 | if (!chip->capture_pipes) { |
1260 | kfree(chip->playback_pipes); | 1260 | kfree(chip->playback_pipes); |
1261 | return -ENOMEM; | 1261 | return -ENOMEM; |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); | ||
1265 | memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); | ||
1266 | |||
1267 | preferred = chip->ibl.size; | 1264 | preferred = chip->ibl.size; |
1268 | chip->ibl.size = 0; | 1265 | chip->ibl.size = 0; |
1269 | vx_set_ibl(chip, &chip->ibl); /* query the info */ | 1266 | vx_set_ibl(chip, &chip->ibl); /* query the info */ |