Commit baf5c001 authored by Wei Yongjun's avatar Wei Yongjun Committed by Saeed Mahameed

net/mlx5: Fix error return code in esw_qos_create()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 85c5f7c9 ("net/mlx5: E-switch, Create QoS on demand")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent d2b8c7ba
......@@ -590,6 +590,7 @@ static int esw_qos_create(struct mlx5_eswitch *esw, struct netlink_ext_ack *exta
if (IS_ERR(esw->qos.group0)) {
esw_warn(dev, "E-Switch create rate group 0 failed (%ld)\n",
PTR_ERR(esw->qos.group0));
err = PTR_ERR(esw->qos.group0);
goto err_group0;
}
}
......
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