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/usb/usbaudio.c | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
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; |