Skip to content

Commit

Permalink
usb: wusbcore: clean up the sg list that was created for out transfers
Browse files Browse the repository at this point in the history
Clean up the SG list after transfer completetion for out transfers if one
was created by the HWA.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Thomas Pugliese authored and Greg Kroah-Hartman committed Sep 26, 2013
1 parent ffd6d17 commit d5b5c9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/wusbcore/wa-xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ static void wa_seg_dto_cb(struct urb *urb)
unsigned rpipe_ready = 0;
u8 done = 0;

/* free the sg if it was used. */
kfree(urb->sg);
urb->sg = NULL;

switch (urb->status) {
case 0:
spin_lock_irqsave(&xfer->lock, flags);
Expand Down

0 comments on commit d5b5c9f

Please sign in to comment.