diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-25 09:28:03 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-08-03 09:21:18 -0400 |
commit | 59feddb25f9d925e86ee22596802405788bc050f (patch) | |
tree | 0d272bdcb64cf2bcc19adf8735215ce261aea355 /sound/drivers/vx | |
parent | fb6a0d635d4ff6b3555179d0154981f03427071a (diff) |
[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
sound: Conversions from kmalloc+memset to k(c|z)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/drivers/vx')
-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 */ |