Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be87544d authored by Eli Cohen's avatar Eli Cohen Committed by David S. Miller
Browse files

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: default avatarEli Cohen <eli@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c3dbd2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {