Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arcnet: move dev_free_skb to its only user

The call for dev_free_skb is done only once. This patch
moves its call to its only user and removes the obsolete
condition variable.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

+2 -8
+2 -8
drivers/net/arcnet/arcnet.c
··· 515 515 struct ArcProto *proto; 516 516 int txbuf; 517 517 unsigned long flags; 518 - int freeskb, retval; 518 + int retval; 519 519 520 520 arc_printk(D_DURING, dev, 521 521 "transmit requested (status=%Xh, txbufs=%d/%d, len=%d, protocol %x)\n", ··· 554 554 * the package later - forget about it now 555 555 */ 556 556 dev->stats.tx_bytes += skb->len; 557 - freeskb = 1; 557 + dev_kfree_skb(skb); 558 558 } else { 559 559 /* do it the 'split' way */ 560 560 lp->outgoing.proto = proto; 561 561 lp->outgoing.skb = skb; 562 562 lp->outgoing.pkt = pkt; 563 - 564 - freeskb = 0; 565 563 566 564 if (proto->continue_tx && 567 565 proto->continue_tx(dev, txbuf)) { ··· 572 574 lp->next_tx = txbuf; 573 575 } else { 574 576 retval = NETDEV_TX_BUSY; 575 - freeskb = 0; 576 577 } 577 578 578 579 arc_printk(D_DEBUG, dev, "%s: %d: %s, status: %x\n", ··· 586 589 __FILE__, __LINE__, __func__, lp->hw.status(dev)); 587 590 588 591 spin_unlock_irqrestore(&lp->lock, flags); 589 - if (freeskb) 590 - dev_kfree_skb(skb); 591 - 592 592 return retval; /* no need to try again */ 593 593 } 594 594 EXPORT_SYMBOL(arcnet_send_packet);