From: luo penghao Date: Thu, 30 Dec 2021 06:26:44 +0000 (+0000) Subject: ethtool: Remove redundant ret assignments X-Git-Tag: v5.19~1494^2~100 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c09f103e89f4554b17c68c3a0a50140fc9133352;p=mirror_ubuntu-kernels.git 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 Signed-off-by: luo penghao Signed-off-by: David S. Miller --- 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;