net/mlx5e: TX, Use correct counter in dma_map error flow
authorTariq Toukan <tariqt@mellanox.com>
Tue, 20 Mar 2018 16:17:25 +0000 (18:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 May 2018 08:20:26 +0000 (10:20 +0200)
commiteac1ab609be07f75ab4faf258bf10e1a1bbbe421
tree780b80cce091f0b705603b4ab504307f6a6effe2
parentb047794cc36c77da3fd81cb578a58a8028f0d692
net/mlx5e: TX, Use correct counter in dma_map error flow

[ Upstream commit d9a96ec362e3da878c378854e25321c85bac52c2 ]

In case of a dma_mapping_error, do not use wi->num_dma
as a parameter for dma unmap function because it's yet
to be set, and holds an out-of-date value.
Use actual value (local variable num_dma) instead.

Fixes: 34802a42b352 ("net/mlx5e: Do not modify the TX SKB")
Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c