Skip to content

Commit

Permalink
ixgbe: Fix ixgbe_tx_map error path
Browse files Browse the repository at this point in the history
Commit e5a4354 (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>
  • Loading branch information
Anton Blanchard authored and David S. Miller committed Feb 4, 2010
1 parent e15eec2 commit e44d38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5179,7 +5179,7 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter,
ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
}

return count;
return 0;
}

static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
Expand Down

0 comments on commit e44d38e

Please sign in to comment.