diff options
author | Eli Cohen <eli@mellanox.com> | 2015-09-25 07:49:12 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-29 05:19:49 (GMT) |
commit | be87544de8df2b1eb34bcb5e32691287d96f9ec4 (patch) | |
tree | 6a2766a1442c62974cca914cda9235db7a82e424 | |
parent | 6c3dbd2d722a6010010ad99a6890a56178385bb8 (diff) | |
download | linux-be87544de8df2b1eb34bcb5e32691287d96f9ec4.tar.xz |
net/mlx5_core: Fix async commands return code
In case of async command completion, the error code returned should take
into account the command completion status.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 75ff58d..c351659 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -1136,6 +1136,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector) mlx5_free_cmd_msg(dev, ent->out); free_msg(dev, ent->in); + err = err ? err : ent->status; free_cmd(ent); callback(err, context); } else { |