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

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Qinglang Miao 2020-09-21 21:10:44 +08:00 committed by Saeed Mahameed
parent e1915a67f6
commit d490c83ef9

View File

@ -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 mlx5_ec_init(struct mlx5_core_dev *dev)
{ {
int err = 0;
if (!mlx5_core_is_ecpf(dev)) if (!mlx5_core_is_ecpf(dev))
return 0; return 0;
/* ECPF shall enable HCA for peer PF in the same way a PF /* ECPF shall enable HCA for peer PF in the same way a PF
* does this for its VFs. * does this for its VFs.
*/ */
err = mlx5_peer_pf_init(dev); return mlx5_peer_pf_init(dev);
if (err)
return err;
return 0;
} }
void mlx5_ec_cleanup(struct mlx5_core_dev *dev) void mlx5_ec_cleanup(struct mlx5_core_dev *dev)