提交 d490c83e 编写于 作者: Q Qinglang Miao 提交者: Saeed Mahameed

net/mlx5: simplify the return expression of mlx5_ec_init()

Simplify the return expression.
Signed-off-by: NQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 e1915a67
......@@ -43,19 +43,13 @@ static void mlx5_peer_pf_cleanup(struct mlx5_core_dev *dev)
int mlx5_ec_init(struct mlx5_core_dev *dev)
{
int err = 0;
if (!mlx5_core_is_ecpf(dev))
return 0;
/* ECPF shall enable HCA for peer PF in the same way a PF
* does this for its VFs.
*/
err = mlx5_peer_pf_init(dev);
if (err)
return err;
return 0;
return mlx5_peer_pf_init(dev);
}
void mlx5_ec_cleanup(struct mlx5_core_dev *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册