Skip to content

Commit

Permalink
net/hsr: Remove left-over never-true conditional code.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Arvid Brodin authored and davem330 committed Jul 11, 2014
1 parent 19278ca commit 279f64b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/hsr/hsr_framereg.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
}
if (port->type != node_dst->AddrB_port)
return;
if (!node_dst->MacAddressB) {
WARN_ONCE(1, "%s: No MacAddressB\n", __func__);
return;
}

ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB);
}
Expand Down

0 comments on commit 279f64b

Please sign in to comment.