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:
parent
e1915a67f6
commit
d490c83ef9
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user