ChangeSet 1.889.379.5, 2003/03/21 17:01:26-08:00, david-b@pacbell.net [PATCH] add missing usb_put_urb() after error This is a multi-part message in MIME format. drivers/usb/core/hcd.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c Tue Mar 25 16:47:12 2003 +++ b/drivers/usb/core/hcd.c Tue Mar 25 16:47:12 2003 @@ -1024,9 +1024,7 @@ */ urb->transfer_flags |= URB_NO_DMA_MAP; status = rh_urb_enqueue (hcd, urb); - if (status) - urb_unlink (urb); - return status; + goto done; } /* lower level hcd code should use *_dma exclusively, @@ -1051,8 +1049,11 @@ } status = hcd->driver->urb_enqueue (hcd, urb, mem_flags); - if (status) +done: + if (status) { + usb_put_urb (urb); urb_unlink (urb); + } return status; }