projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f6f06e
)
USB: usbaudio: handle kcalloc failure
author
Jim Meyering
<jim@meyering.net>
Tue, 4 Mar 2008 23:25:11 +0000
(15:25 -0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 10 Mar 2008 23:42:25 +0000
(16:42 -0700)
sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/usb/usbaudio.c
patch
|
blob
|
history
diff --git
a/sound/usb/usbaudio.c
b/sound/usb/usbaudio.c
index 675672f313be322138c8902ce95a889a78c72782..f48838a078cb718c050cb02dd71945be16eaa88c 100644
(file)
--- a/
sound/usb/usbaudio.c
+++ b/
sound/usb/usbaudio.c
@@
-1762,6
+1762,8
@@
static int check_hw_params_convention(struct snd_usb_substream *subs)
channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
+ if (!channels || !rates)
+ goto __out;
list_for_each(p, &subs->fmt_list) {
struct audioformat *f;