Commit e9864539 authored by Parav Pandit's avatar Parav Pandit Committed by Saeed Mahameed

net/mlx5: E-switch, Fix printing wrong error value

When mlx5_modify_header_alloc() fails, instead of printing the error
value returned, current error log prints 0.

Fix by printing correct error value returned by
mlx5_modify_header_alloc().

Fixes: 6724e66b ("net/mlx5: E-Switch, Get reg_c1 value on miss")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 79949985
...@@ -1550,9 +1550,9 @@ static int esw_create_restore_table(struct mlx5_eswitch *esw) ...@@ -1550,9 +1550,9 @@ static int esw_create_restore_table(struct mlx5_eswitch *esw)
MLX5_FLOW_NAMESPACE_KERNEL, 1, MLX5_FLOW_NAMESPACE_KERNEL, 1,
modact); modact);
if (IS_ERR(mod_hdr)) { if (IS_ERR(mod_hdr)) {
err = PTR_ERR(mod_hdr);
esw_warn(dev, "Failed to create restore mod header, err: %d\n", esw_warn(dev, "Failed to create restore mod header, err: %d\n",
err); err);
err = PTR_ERR(mod_hdr);
goto err_mod_hdr; goto err_mod_hdr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment