提交 279f64b7 编写于 作者: A Arvid Brodin 提交者: David S. Miller

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: NArvid Brodin <arvid.brodin@alten.se>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 19278cab
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册