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: <20211230062644.586079-1-luo.penghao@zte.com.cn>
Date:   Thu, 30 Dec 2021 06:26:44 +0000
From:   cgel.zte@...il.com
To:     "David S . Miller" <davem@...emloft.net>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        luo penghao <luo.penghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux] ethtool: Remove redundant ret assignments

From: luo penghao <luo.penghao@....com.cn>

The assignment here will be overwritten, so it should be deleted

The clang_analyzer complains as follows:

net/ethtool/netlink.c:

Value stored to 'ret' is never read

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: luo penghao <luo.penghao@....com.cn>
---
 net/ethtool/netlink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index b3729bd..5e23462 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -633,7 +633,6 @@ static void ethnl_default_notify(struct net_device *dev, unsigned int cmd,
 	if (ret < 0)
 		goto err_cleanup;
 	reply_len = ret + ethnl_reply_header_size();
-	ret = -ENOMEM;
 	skb = genlmsg_new(reply_len, GFP_KERNEL);
 	if (!skb)
 		goto err_cleanup;
-- 
2.15.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ