summaryrefslogtreecommitdiff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-11-24 13:30:28 -0500
committerChris Metcalf <cmetcalf@tilera.com>2010-11-24 13:30:28 -0500
commitb03a6c4c7d8ebd8118d668eafdb85f5f76b5437f (patch)
treef6ca7059e9c1bc1aac9a6741316f8e07ba349f7f /sound/usb/pcm.c
parent24f3f6b5eff92608a62449e33bfac0eed1447d02 (diff)
parent3561d43fd289f590fdae672e5eb831b8d5cf0bf6 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index cff3a3c465d7..4132522ac90f 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -676,8 +676,10 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime,
if (!needs_knot)
return 0;
- subs->rate_list.count = count;
subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL);
+ if (!subs->rate_list.list)
+ return -ENOMEM;
+ subs->rate_list.count = count;
subs->rate_list.mask = 0;
count = 0;
list_for_each_entry(fp, &subs->fmt_list, list) {