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]
Date:   Wed, 11 Jan 2023 18:30:48 +0100
From:   Piergiorgio Beruto <piergiorgio.beruto@...il.com>
To:     Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        mailhol.vincent@...adoo.fr, sudheer.mogilappagari@...el.com,
        sbhatta@...vell.com, linux-doc@...r.kernel.org,
        wangjie125@...wei.com, corbet@....net, lkp@...el.com,
        gal@...dia.com, gustavoars@...nel.org, bagasdotme@...il.com
Subject: [PATCH net-next 1/1] plca.c: fix obvious mistake in checking retval

This patch addresses a wrong fix that was done during the review
process. The intention was to substitute "if(ret < 0)" with
"if(ret)". Unfortunately, in this specific file the intended fix did not
meet the code.

Signed-off-by: Piergiorgio Beruto <piergiorgio.beruto@...il.com>
---
 net/ethtool/plca.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/ethtool/plca.c b/net/ethtool/plca.c
index d9bb13ffc654..9c7d29186b4e 100644
--- a/net/ethtool/plca.c
+++ b/net/ethtool/plca.c
@@ -61,7 +61,7 @@ static int plca_get_cfg_prepare_data(const struct ethnl_req_info *req_base,
 	}
 
 	ret = ethnl_ops_begin(dev);
-	if (!ret)
+	if (ret)
 		goto out;
 
 	memset(&data->plca_cfg, 0xff,
@@ -151,7 +151,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info)
 					 tb[ETHTOOL_A_PLCA_HEADER],
 					 genl_info_net(info), info->extack,
 					 true);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	dev = req_info.dev;
@@ -171,7 +171,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info)
 	}
 
 	ret = ethnl_ops_begin(dev);
-	if (!ret)
+	if (ret)
 		goto out_rtnl;
 
 	memset(&plca_cfg, 0xff, sizeof(plca_cfg));
@@ -189,7 +189,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info)
 		goto out_ops;
 
 	ret = ops->set_plca_cfg(dev->phydev, &plca_cfg, info->extack);
-	if (!ret)
+	if (ret)
 		goto out_ops;
 
 	ethtool_notify(dev, ETHTOOL_MSG_PLCA_NTF, NULL);
@@ -233,7 +233,7 @@ static int plca_get_status_prepare_data(const struct ethnl_req_info *req_base,
 	}
 
 	ret = ethnl_ops_begin(dev);
-	if (!ret)
+	if (ret)
 		goto out;
 
 	memset(&data->plca_st, 0xff,
-- 
2.37.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ