summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec/ewrk3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/dec/ewrk3.c')
-rw-r--r--drivers/net/ethernet/dec/ewrk3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dec/ewrk3.c b/drivers/net/ethernet/dec/ewrk3.c
index f9df5e4d034..1879f84a25a 100644
--- a/drivers/net/ethernet/dec/ewrk3.c
+++ b/drivers/net/ethernet/dec/ewrk3.c
@@ -986,8 +986,10 @@ static int ewrk3_rx(struct net_device *dev)
dev->stats.rx_fifo_errors++;
} else {
struct sk_buff *skb;
+ skb = netdev_alloc_skb(dev,
+ pkt_len + 2);
- if ((skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
+ if (skb != NULL) {
unsigned char *p;
skb_reserve(skb, 2); /* Align to 16 bytes */
p = skb_put(skb, pkt_len);