]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASIX: Simplify condition in rx_fixup()
authorMarek Vasut <marek.vasut@gmail.com>
Tue, 26 Jul 2011 16:44:46 +0000 (16:44 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:36:38 +0000 (09:36 -0800)
commit bc466e678d0a98f445bf3f9c76fedf18e7dcc6b0 upstream.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/usb/asix.c

index 52502883523ed99cab0d9ca9db455b344fe7728f..d5b62a46340128490e147844771881f3160f803d 100644 (file)
@@ -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);