Nigel Christian
2021-May-25  04:05 UTC
[Bridge] [PATCH] net: bridge: remove redundant assignment
The variable br is assigned a value that is not being read after
exiting case IFLA_STATS_LINK_XSTATS_SLAVE. The assignment is
redundant and can be removed.
Addresses-Coverity ("Unused value")
Signed-off-by: Nigel Christian <nigel.l.christian at gmail.com>
---
 net/bridge/br_netlink.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index e4e6e991313e..8642e56059fb 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -1644,7 +1644,6 @@ static size_t br_get_linkxstats_size(const struct
net_device *dev, int attr)
 		p = br_port_get_rtnl(dev);
 		if (!p)
 			return 0;
-		br = p->br;
 		vg = nbp_vlan_group(p);
 		break;
 	default:
-- 
2.31.1
patchwork-bot+netdevbpf at kernel.org
2021-May-25  22:30 UTC
[Bridge] [PATCH] net: bridge: remove redundant assignment
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 24 May 2021 23:05:58 -0500 you wrote:> The variable br is assigned a value that is not being read after > exiting case IFLA_STATS_LINK_XSTATS_SLAVE. The assignment is > redundant and can be removed. > > Addresses-Coverity ("Unused value") > Signed-off-by: Nigel Christian <nigel.l.christian at gmail.com> > > [...]Here is the summary with links: - net: bridge: remove redundant assignment https://git.kernel.org/netdev/net-next/c/ccc882f0d838 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html