]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
firewire: fw-ohci: missing dma_unmap_single
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 29 Aug 2007 17:40:28 +0000 (19:40 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 16 Oct 2007 22:00:07 +0000 (00:00 +0200)
at_context_queue_packet() didn't clean up in an early exit path.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
drivers/firewire/fw-ohci.c

index a333748255269659abfbee6c314e28f93d5e5af7..ec70c9f911712b956426acd92a1148cea9653491 100644 (file)
@@ -680,6 +680,9 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
 
        /* FIXME: Document how the locking works. */
        if (ohci->generation != packet->generation) {
+               if (packet->payload_length > 0)
+                       dma_unmap_single(ohci->card.device, payload_bus,
+                                        packet->payload_length, DMA_TO_DEVICE);
                packet->ack = RCODE_GENERATION;
                return -1;
        }