aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2008-03-04 15:25:11 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-03-10 16:42:25 -0700
commitff17e953cb70e37ceb7b487113a0a37441052219 (patch)
tree07b01496e8a3879ff244ce4e4cf69116dff17222 /sound/usb
parent6f6f06ee6ada13b0fb39c800f8567ff81d4e807d (diff)
downloadkernel_samsung_aries-ff17e953cb70e37ceb7b487113a0a37441052219.zip
kernel_samsung_aries-ff17e953cb70e37ceb7b487113a0a37441052219.tar.gz
kernel_samsung_aries-ff17e953cb70e37ceb7b487113a0a37441052219.tar.bz2
USB: usbaudio: handle kcalloc failure
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>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 675672f..f48838a 100644
--- 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;