Skip to content

Commit

Permalink
ethtool: Remove redundant ret assignments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
luo penghao authored and David S. Miller committed Dec 30, 2021
1 parent dda0c2e commit c09f103
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/ethtool/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c09f103

Please sign in to comment.