diff options
author | luo penghao <luo.penghao@zte.com.cn> | 2021-12-30 07:26:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-30 14:29:14 +0100 |
commit | c09f103e89f4554b17c68c3a0a50140fc9133352 (patch) | |
tree | 60c88614a2ce022372fbb7a96842ff4e7e853f58 /net/ethtool/netlink.c | |
parent | net: lantiq_etop: remove unnecessary space in cast (diff) | |
download | linux-c09f103e89f4554b17c68c3a0a50140fc9133352.tar.xz linux-c09f103e89f4554b17c68c3a0a50140fc9133352.zip |
ethtool: Remove redundant ret assignments
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@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/ethtool/netlink.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index f09c62302a9a..ea23659fab28 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -638,7 +638,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; |