lkml.org 
[lkml]   [2008]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] usbaudio: handle kcalloc failure
    Date
    * sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure.

    Signed-off-by: Jim Meyering <meyering@redhat.com>
    ---
    sound/usb/usbaudio.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
    index 8fa9356..b61533d 100644
    --- a/sound/usb/usbaudio.c
    +++ b/sound/usb/usbaudio.c
    @@ -1735,6 +1735,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;
    --
    1.5.4.2.134.g82883


    \
     
     \ /
      Last update: 2008-02-19 23:19    [W:0.021 / U:117.888 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site