lkml.org 
[lkml]   [2010]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/3] Input: xpad - return proper error in error path
    Date
    Am Freitag, 12. November 2010, 03:48:36 schrieb Axel Lin:
    > In current implementation, xpad_probe return 0 when
    > usb_alloc_urb failed for xpad->bulk_out and kzalloc failed for xpad->bdata.
    >
    > This patch removes the initialization for error variable,
    > assign the error code at the place the error happens instead.

    I am afraid you cannot let stand the order of allocations here anyway,
    as xpad->irq_in is currently submitted before xpad->bulk_out is allocated.
    That however is a race, because the callback for irq_in can call
    xpad360w_process_packet(), which will in turn submit the bulk URB.

    I am afraid your patch is pointless unless the logic is also fixed.

    Regards
    Oliver


    \
     
     \ /
      Last update: 2010-11-12 14:45    [W:0.041 / U:3.928 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site