mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
6f6f06ee6a
commit
ff17e953cb
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue