arcnet: Remove pointer comparisons to NULL
authorJoe Perches <joe@perches.com>
Tue, 5 May 2015 17:06:00 +0000 (10:06 -0700)
committerMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 23 Sep 2015 06:44:25 +0000 (08:44 +0200)
Use direct tests of pointer instead.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
drivers/net/arcnet/arc-rawmode.c
drivers/net/arcnet/capmode.c
drivers/net/arcnet/rfc1051.c
drivers/net/arcnet/rfc1201.c

index 7fc5b0420d62cfb2e9cb266fd1b3b21343b988e7..40035ee8cb40431b320e7758a75d6c6e2f33fd02 100644 (file)
@@ -97,7 +97,7 @@ static void rx(struct net_device *dev, int bufnum,
                ofs = 256 - length;
 
        skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC);
-       if (skb == NULL) {
+       if (!skb) {
                dev->stats.rx_dropped++;
                return;
        }
index de80d9e0e53f0091c6a6f90967336efbfcf1bc60..a898647ab05d063e24c6651b1f45977645ff1238 100644 (file)
@@ -56,7 +56,7 @@ static void rx(struct net_device *dev, int bufnum,
                ofs = 256 - length;
 
        skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC);
-       if (skb == NULL) {
+       if (!skb) {
                dev->stats.rx_dropped++;
                return;
        }
@@ -196,7 +196,7 @@ static int ack_tx(struct net_device *dev, int acked)
 
        /* Now alloc a skb to send back up through the layers: */
        ackskb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC);
-       if (ackskb == NULL)
+       if (!ackskb)
                goto free_outskb;
 
        skb_put(ackskb, length + ARC_HDR_SIZE);
index 7e7eda5b02325a326ca05d1509593af11388f805..b76e458b19e09e4676d0617befe19fb80d34c966 100644 (file)
@@ -133,7 +133,7 @@ static void rx(struct net_device *dev, int bufnum,
                ofs = 256 - length;
 
        skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC);
-       if (skb == NULL) {
+       if (!skb) {
                dev->stats.rx_dropped++;
                return;
        }
index 9040a8be155c32db85027fcbf267133bd2a68a84..1d777c1e8383ad83ff310e82eb470dfc10a11cdf 100644 (file)
@@ -178,7 +178,7 @@ static void rx(struct net_device *dev, int bufnum,
                in->sequence = soft->sequence;
 
                skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC);
-               if (skb == NULL) {
+               if (!skb) {
                        dev->stats.rx_dropped++;
                        return;
                }
@@ -286,7 +286,7 @@ static void rx(struct net_device *dev, int bufnum,
                        }
                        in->skb = skb = alloc_skb(508 * in->numpackets + ARC_HDR_SIZE,
                                                  GFP_ATOMIC);
-                       if (skb == NULL) {
+                       if (!skb) {
                                arc_printk(D_NORMAL, dev, "(split) memory squeeze, dropping packet.\n");
                                lp->rfc1201.aborted_seq = soft->sequence;
                                dev->stats.rx_dropped++;