aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-07-25 09:28:03 -0400
committerJaroslav Kysela <perex@suse.cz>2006-08-03 09:21:18 -0400
commit59feddb25f9d925e86ee22596802405788bc050f (patch)
tree0d272bdcb64cf2bcc19adf8735215ce261aea355 /sound/usb
parentfb6a0d635d4ff6b3555179d0154981f03427071a (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/usb')
-rw-r--r--sound/usb/usbaudio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index d32d83d970cc..1b7f499c549d 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2260,10 +2260,9 @@ static int add_audio_endpoint(struct snd_usb_audio *chip, int stream, struct aud
2260 } 2260 }
2261 2261
2262 /* create a new pcm */ 2262 /* create a new pcm */
2263 as = kmalloc(sizeof(*as), GFP_KERNEL); 2263 as = kzalloc(sizeof(*as), GFP_KERNEL);
2264 if (! as) 2264 if (! as)
2265 return -ENOMEM; 2265 return -ENOMEM;
2266 memset(as, 0, sizeof(*as));
2267 as->pcm_index = chip->pcm_devs; 2266 as->pcm_index = chip->pcm_devs;
2268 as->chip = chip; 2267 as->chip = chip;
2269 as->fmt_type = fp->fmt_type; 2268 as->fmt_type = fp->fmt_type;
@@ -2633,13 +2632,12 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2633 csep = NULL; 2632 csep = NULL;
2634 } 2633 }
2635 2634
2636 fp = kmalloc(sizeof(*fp), GFP_KERNEL); 2635 fp = kzalloc(sizeof(*fp), GFP_KERNEL);
2637 if (! fp) { 2636 if (! fp) {
2638 snd_printk(KERN_ERR "cannot malloc\n"); 2637 snd_printk(KERN_ERR "cannot malloc\n");
2639 return -ENOMEM; 2638 return -ENOMEM;
2640 } 2639 }
2641 2640
2642 memset(fp, 0, sizeof(*fp));
2643 fp->iface = iface_no; 2641 fp->iface = iface_no;
2644 fp->altsetting = altno; 2642 fp->altsetting = altno;
2645 fp->altset_idx = i; 2643 fp->altset_idx = i;