aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/usbaudio.c')
-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;