Message ID | 20211230062644.586079-1-luo.penghao@zte.com.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | c09f103e89f4554b17c68c3a0a50140fc9133352 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [linux] ethtool: Remove redundant ret assignments | expand |
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Thu, 30 Dec 2021 06:26:44 +0000 you wrote: > From: luo penghao <luo.penghao@zte.com.cn> > > The assignment here will be overwritten, so it should be deleted > > The clang_analyzer complains as follows: > > net/ethtool/netlink.c: > > [...] Here is the summary with links: - [linux] ethtool: Remove redundant ret assignments https://git.kernel.org/netdev/net-next/c/c09f103e89f4 You are awesome, thank you!
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;