提交 bc466e67 编写于 作者: M Marek Vasut 提交者: David S. Miller

ASIX: Simplify condition in rx_fixup()

Signed-off-by: NMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a0295a3b
......@@ -314,10 +314,9 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
skb_pull(skb, 4);
while (skb->len > 0) {
if ((short)(header & 0x0000ffff) !=
~((short)((header & 0xffff0000) >> 16))) {
if ((header & 0xffff) != ((~header >> 16) & 0xffff))
netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n");
}
/* get the packet length */
size = (u16) (header & 0x0000ffff);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册