Commit f6a258d1 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] add missing usb_put_urb() after error

This is a multi-part message in MIME format.
parent f34f794f
......@@ -1024,9 +1024,7 @@ static int hcd_submit_urb (struct urb *urb, int mem_flags)
*/
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 @@ static int hcd_submit_urb (struct urb *urb, int mem_flags)
}
status = hcd->driver->urb_enqueue (hcd, urb, mem_flags);
if (status)
done:
if (status) {
usb_put_urb (urb);
urb_unlink (urb);
}
return status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment