diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-08-14 15:33:54 -0400 | 
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-08-14 15:33:54 -0400 | 
| commit | e9ffb3d7ec94083a44a8721681391beca2ffd68c (patch) | |
| tree | 6768ab487b3f44c2a4995ee61307e47760ca9b88 /sound/usb/usbaudio.c | |
| parent | 8b9411014e6f18a883c18b38f41338dbd53fddea (diff) | |
| parent | e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'sound/usb/usbaudio.c')
| -rw-r--r-- | sound/usb/usbaudio.c | 6 | 
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; | 
