Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/hsr: Remove left-over never-true conditional code.

MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated
as a part of *node_dst (which is a struct hsr_node). So the condition is always
false.

Detected by Dan Carpenter.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arvid Brodin and committed by
David S. Miller
279f64b7 19278cab

-4
-4
net/hsr/hsr_framereg.c
··· 290 290 } 291 291 if (port->type != node_dst->AddrB_port) 292 292 return; 293 - if (!node_dst->MacAddressB) { 294 - WARN_ONCE(1, "%s: No MacAddressB\n", __func__); 295 - return; 296 - } 297 293 298 294 ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB); 299 295 }