lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210210074605.867456-1-weiyongjun1@huawei.com>
Date:   Wed, 10 Feb 2021 07:46:05 +0000
From:   Wei Yongjun <weiyongjun1@...wei.com>
To:     Hulk Robot <hulkci@...wei.com>, Saeed Mahameed <saeedm@...dia.com>,
        "Leon Romanovsky" <leon@...nel.org>,
        Vlad Buslov <vladbu@...dia.com>,
        Jakub Kicinski <kuba@...nel.org>
CC:     Wei Yongjun <weiyongjun1@...wei.com>, <netdev@...r.kernel.org>,
        <linux-rdma@...r.kernel.org>
Subject: [PATCH net-next] 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: 8914add2c9e5 ("net/mlx5e: Handle FIB events to update tunnel endpoint device")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index db142ee96510..9f126054d371 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ