Skip to content

Commit

Permalink
USB: usbaudio: handle kcalloc failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jim Meyering authored and Greg Kroah-Hartman committed Mar 10, 2008
1 parent 6f6f06e commit ff17e95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff17e95

Please sign in to comment.