Commit ff17e953 authored by Jim Meyering's avatar Jim Meyering Committed by Greg Kroah-Hartman

USB: usbaudio: handle kcalloc failure

sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure.
Signed-off-by: default avatarJim Meyering <meyering@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6f6f06ee
...@@ -1762,6 +1762,8 @@ static int check_hw_params_convention(struct snd_usb_substream *subs) ...@@ -1762,6 +1762,8 @@ static int check_hw_params_convention(struct snd_usb_substream *subs)
channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
rates = 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) { list_for_each(p, &subs->fmt_list) {
struct audioformat *f; struct audioformat *f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment