Skip to content

Commit

Permalink
net/mlx5: simplify the return expression of mlx5_ec_init()
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Qinglang Miao authored and Saeed Mahameed committed Sep 23, 2020
1 parent e1915a6 commit d490c83
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/ethernet/mellanox/mlx5/core/ecpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d490c83

Please sign in to comment.