提交 ff17e953 编写于 作者: J Jim Meyering 提交者: Greg Kroah-Hartman

USB: usbaudio: handle kcalloc failure

sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure.
Signed-off-by: NJim Meyering <meyering@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6f6f06ee
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册