]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/wusbcore/wa-xfer.c
usb: wusbcore: clean up the sg list that was created for out transfers
[karo-tx-linux.git] / drivers / usb / wusbcore / wa-xfer.c
index f614fb1ed77f8a217899e518bbd4993f709a2262..61b0597c399ba4642bcecb37c141b12decec674c 100644 (file)
@@ -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);