summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorAlexander Vassilevski <oss@vassilevski.com>2026-05-17 15:07:57 -0700
committerJakub Kicinski <kuba@kernel.org>2026-05-20 17:00:44 -0700
commit2e68f49bda78f6f62f5b287dbed1ee69a44b9a67 (patch)
tree6f5e4347d28c4fc5248f02eb5cbfa6cfb87f9dfd /scripts/const_structs.checkpatch
parent9758c11fc6c138a79a28a5659feeaa3abde7aa6a (diff)
net: ethernet: ti: am65-cpsw-nuss: remove dead vid check in slave_add_vid()
am65_cpsw_nuss_ndo_slave_add_vid() returns early at the top with: if (!netif_running(ndev) || !vid) return 0; so vid is guaranteed to be non-zero in the rest of the function. The subsequent if (!vid) unreg_mcast = port_mask; is therefore unreachable. Drop the dead branch. With that branch gone, unreg_mcast is only ever its initializer value of zero, so drop the variable and pass 0 directly to cpsw_ale_vlan_add_modify(). No functional change. Found by Smatch. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/aS_lhMwppbDHoEcX@stanley.mountain Signed-off-by: Alexander Vassilevski <oss@vassilevski.com> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://patch.msgid.link/20260517220757.2679458-1-oss@vassilevski.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions