Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275309
b: refs/heads/master
c: 43df2a5
h: refs/heads/master
i:
  275307: add1651
v: v3
  • Loading branch information
Thomas Meyer authored and Takashi Iwai committed Nov 10, 2011
1 parent d553fc3 commit 5101d53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f451d2a2a44b66586b803763068195088f9ccd4
refs/heads/master: 43df2a57b773596cd0bdd2316889ff9653121015
7 changes: 3 additions & 4 deletions trunk/sound/usb/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
return -ENOMEM;
}
if (fp->nr_rates > 0) {
rate_table = kmalloc(sizeof(int) * fp->nr_rates, GFP_KERNEL);
rate_table = kmemdup(fp->rate_table,
sizeof(int) * fp->nr_rates, GFP_KERNEL);
if (!rate_table) {
kfree(fp);
return -ENOMEM;
}
memcpy(rate_table, fp->rate_table, sizeof(int) * fp->nr_rates);
fp->rate_table = rate_table;
}

Expand Down Expand Up @@ -224,10 +224,9 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
if (altsd->bNumEndpoints != 1)
return -ENXIO;

fp = kmalloc(sizeof(*fp), GFP_KERNEL);
fp = kmemdup(&ua_format, sizeof(*fp), GFP_KERNEL);
if (!fp)
return -ENOMEM;
memcpy(fp, &ua_format, sizeof(*fp));

fp->iface = altsd->bInterfaceNumber;
fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
Expand Down

0 comments on commit 5101d53

Please sign in to comment.