diff options
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r-- | drivers/net/8139cp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 50efde11ea6c..d0dbbf39349a 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -515,7 +515,7 @@ rx_status_loop: | |||
515 | dma_addr_t mapping; | 515 | dma_addr_t mapping; |
516 | struct sk_buff *skb, *new_skb; | 516 | struct sk_buff *skb, *new_skb; |
517 | struct cp_desc *desc; | 517 | struct cp_desc *desc; |
518 | unsigned buflen; | 518 | const unsigned buflen = cp->rx_buf_sz; |
519 | 519 | ||
520 | skb = cp->rx_skb[rx_tail]; | 520 | skb = cp->rx_skb[rx_tail]; |
521 | BUG_ON(!skb); | 521 | BUG_ON(!skb); |
@@ -549,8 +549,7 @@ rx_status_loop: | |||
549 | pr_debug("%s: rx slot %d status 0x%x len %d\n", | 549 | pr_debug("%s: rx slot %d status 0x%x len %d\n", |
550 | dev->name, rx_tail, status, len); | 550 | dev->name, rx_tail, status, len); |
551 | 551 | ||
552 | buflen = cp->rx_buf_sz + NET_IP_ALIGN; | 552 | new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN); |
553 | new_skb = netdev_alloc_skb(dev, buflen); | ||
554 | if (!new_skb) { | 553 | if (!new_skb) { |
555 | dev->stats.rx_dropped++; | 554 | dev->stats.rx_dropped++; |
556 | goto rx_next; | 555 | goto rx_next; |