Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;