浏览代码

usb: wusbcore: clean up the sg list that was created for out transfers

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>
Thomas Pugliese 12 年之前
父节点
当前提交
d5b5c9f228
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/usb/wusbcore/wa-xfer.c

+ 4 - 0
drivers/usb/wusbcore/wa-xfer.c

@@ -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);