[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442912534-10821-16-git-send-email-m.grzeschik@pengutronix.de>
Date: Tue, 22 Sep 2015 11:01:56 +0200
From: Michael Grzeschik <m.grzeschik@...gutronix.de>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, joe@...ches.com, kernel@...gutronix.de
Subject: [PATCH 15/33] arcnet: Remove pointer comparisons to NULL
From: Joe Perches <joe@...ches.com>
Use direct tests of pointer instead.
Signed-off-by: Joe Perches <joe@...ches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
---
drivers/net/arcnet/arc-rawmode.c | 2 +-
drivers/net/arcnet/capmode.c | 4 ++--
drivers/net/arcnet/rfc1051.c | 2 +-
drivers/net/arcnet/rfc1201.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c
index 7fc5b042..40035ee 100644
--- a/drivers/net/arcnet/arc-rawmode.c
+++ b/drivers/net/arcnet/arc-rawmode.c
@@ -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;
}
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
index de80d9e..a898647 100644
--- a/drivers/net/arcnet/capmode.c
+++ b/drivers/net/arcnet/capmode.c
@@ -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);
diff --git a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c
index 7e7eda5..b76e458 100644
--- a/drivers/net/arcnet/rfc1051.c
+++ b/drivers/net/arcnet/rfc1051.c
@@ -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;
}
diff --git a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c
index 9040a8b..1d777c1 100644
--- a/drivers/net/arcnet/rfc1201.c
+++ b/drivers/net/arcnet/rfc1201.c
@@ -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++;
--
2.5.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists