]> err.no Git - linux-2.6/commitdiff
firewire: fw-ohci: shut up a superfluous compiler warning
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 21 Oct 2007 09:20:07 +0000 (11:20 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 22 Oct 2007 17:48:56 +0000 (19:48 +0200)
New warning since commit ab88ca488b8af66c3defa165874e81e695319a19,
"firewire: fw-ohci: missing dma_unmap_single":
drivers/firewire/fw-ohci.c: In function 'at_context_transmit':
drivers/firewire/fw-ohci.c:609: warning: 'payload_bus' may be used
 uninitialized in this function

Access to payload_bus is conditional on packet->payload_length > 0,
and that won't change while in at_context_queue_packet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-ohci.c

index e4b9a7d17afc719d8a0a77a2091be0c84a9a8602..67588326ae56e2a9810207415e15c09141fc0622 100644 (file)
@@ -606,7 +606,7 @@ static int
 at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
 {
        struct fw_ohci *ohci = ctx->ohci;
-       dma_addr_t d_bus, payload_bus;
+       dma_addr_t d_bus, uninitialized_var(payload_bus);
        struct driver_data *driver_data;
        struct descriptor *d, *last;
        __le32 *header;