lkml.org 
[lkml]   [2006]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 20/33] usb: legousbtower free kill urb cleanup
    Date
    Hello,

    - usb_free_urb() cleanup
    - usb_kill_urb() cleanup

    Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

    --- linux-2.6.19-rc4-orig/drivers/usb/misc/legousbtower.c 2006-11-06 17:08:21.000000000 +0100
    +++ linux-2.6.19-rc4/drivers/usb/misc/legousbtower.c 2006-11-07 17:01:19.000000000 +0100
    @@ -317,12 +317,8 @@ static inline void tower_delete (struct
    tower_abort_transfers (dev);

    /* free data structures */
    - if (dev->interrupt_in_urb != NULL) {
    - usb_free_urb (dev->interrupt_in_urb);
    - }
    - if (dev->interrupt_out_urb != NULL) {
    - usb_free_urb (dev->interrupt_out_urb);
    - }
    + usb_free_urb (dev->interrupt_in_urb);
    + usb_free_urb (dev->interrupt_out_urb);
    kfree (dev->read_buffer);
    kfree (dev->interrupt_in_buffer);
    kfree (dev->interrupt_out_buffer);
    @@ -502,15 +498,11 @@ static void tower_abort_transfers (struc
    if (dev->interrupt_in_running) {
    dev->interrupt_in_running = 0;
    mb();
    - if (dev->interrupt_in_urb != NULL && dev->udev) {
    + if (dev->udev)
    usb_kill_urb (dev->interrupt_in_urb);
    - }
    - }
    - if (dev->interrupt_out_busy) {
    - if (dev->interrupt_out_urb != NULL && dev->udev) {
    - usb_kill_urb (dev->interrupt_out_urb);
    - }
    }
    + if (dev->interrupt_out_busy && dev->udev)
    + usb_kill_urb (dev->interrupt_out_urb);

    exit:
    dbg(2, "%s: leave", __FUNCTION__);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-11-08 15:41    [W:0.069 / U:30.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site