ixgbe: Fix ixgbe_tx_map error path
authorAnton Blanchard <anton@samba.org>
Wed, 3 Feb 2010 13:12:51 +0000 (13:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Feb 2010 03:17:16 +0000 (19:17 -0800)
Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove
skb_dma_map/unmap calls from driver) looks to have introduced a bug in
ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
through count until it becomes -1 and return that.

The caller of ixgbe_tx_map expects 0 on error, so return that instead.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe_main.c

index b5f64ad6797510fe872a2f62e9254b310d2a1ff4..37e2af0a6145baa197c859559c1c02a1ae28ee51 100644 (file)
@@ -5179,7 +5179,7 @@ dma_error:
                ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
        }
 
-       return count;
+       return 0;
 }
 
 static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,