Skip to content

Commit

Permalink
ASIX: Simplify condition in rx_fixup()
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Marek Vasut authored and David S. Miller committed Jul 28, 2011
1 parent a0295a3 commit bc466e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bc466e6

Please sign in to comment.