net/mlx4_en: Fix handling of dma_map failure
authorAmir Vadai <amirv@mellanox.com>
Wed, 21 Aug 2013 07:08:58 +0000 (10:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 19:19:26 +0000 (12:19 -0700)
commit237a3a3b1544574ead3dc459063424de8c0319e0
tree813670497a0922ae11c17bb23e05287b1ff12f39
parentbd2f631d7c60502e24e801a3eea1806868951bcc
net/mlx4_en: Fix handling of dma_map failure

Result of skb_frag_dma_map() and dma_map_single() wasn't checked.
Added a check and proper handling in case of failure.
Moved the mapping to the beginning of mlx4_en_xmit(), before updating
the ring data structure to make error handling easier.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c