mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
6c3dbd2d72
commit
be87544de8
|
@ -1136,6 +1136,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector)
|
||||||
mlx5_free_cmd_msg(dev, ent->out);
|
mlx5_free_cmd_msg(dev, ent->out);
|
||||||
free_msg(dev, ent->in);
|
free_msg(dev, ent->in);
|
||||||
|
|
||||||
|
err = err ? err : ent->status;
|
||||||
free_cmd(ent);
|
free_cmd(ent);
|
||||||
callback(err, context);
|
callback(err, context);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue