net/mlx5: Fix teardown errors that happen in pci error handler
authorMohamad Haj Yahia <mohamad@mellanox.com>
Thu, 30 Jun 2016 14:34:38 +0000 (17:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 10:12:02 +0000 (06:12 -0400)
commit0d834442cc247c7b3f3bd6019512ae03e96dd99a
tree9634c0eadc455735f435b188a30fd1aaf9bbf174
parentf87fda00b6ed232a817c655b8d179b48bde8fdbe
net/mlx5: Fix teardown errors that happen in pci error handler

In case of internal error state we will simulate the commands status
through the return value translation function, but we need to simulate
all the teardown fw commands as successful so we will not have fw
command failure prints.
This also fix memory leaks that happen because we skip teardown stages
due to failed fw commands.

Fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c