From: Marek Vasut Date: Tue, 26 Jul 2011 16:44:46 +0000 (+0000) Subject: ASIX: Simplify condition in rx_fixup() X-Git-Tag: v3.0.9~91 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=611778cd2a87a9b7376994caf4faa0caac9d1037;p=karo-tx-linux.git ASIX: Simplify condition in rx_fixup() commit bc466e678d0a98f445bf3f9c76fedf18e7dcc6b0 upstream. Signed-off-by: Marek Vasut Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 52502883523e..d5b62a463401 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -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);