Commit 2b6c3c1e authored by Wei Yongjun's avatar Wei Yongjun Committed by Saeed Mahameed
Browse files

net/mlx5e: Fix error return code in mlx5e_tc_esw_init()



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

This commit also using 0 instead of 'ret' when success since it is
always equal to 0.

Fixes: 8914add2 ("net/mlx5e: Handle FIB events to update tunnel endpoint device")
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 4782c5d8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4750,10 +4750,12 @@ int mlx5e_tc_esw_init(struct rhashtable *tc_ht)
	lockdep_set_class(&tc_ht->mutex, &tc_ht_lock_key);

	uplink_priv->encap = mlx5e_tc_tun_init(priv);
	if (IS_ERR(uplink_priv->encap))
	if (IS_ERR(uplink_priv->encap)) {
		err = PTR_ERR(uplink_priv->encap);
		goto err_register_fib_notifier;
	}

	return err;
	return 0;

err_register_fib_notifier:
	rhashtable_destroy(tc_ht);