From: Jim Meyering sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure. Signed-off-by: Jim Meyering Cc: Greg KH Signed-off-by: Andrew Morton --- sound/usb/usbaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN sound/usb/usbaudio.c~usbaudio-handle-kcalloc-failure sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c~usbaudio-handle-kcalloc-failure +++ a/sound/usb/usbaudio.c @@ -1735,6 +1735,8 @@ static int check_hw_params_convention(st 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; _