diff options
author | Szymon Janc <szymon@janc.net.pl> | 2010-11-27 08:39:44 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 18:06:57 -0800 |
commit | 9b03b06b65856f70564c53654d44053f3072379e (patch) | |
tree | 74394fd47a9abea8b9a6b0f8992ef943f4ddb652 /drivers/net/forcedeth.c | |
parent | 78aea4fc67a7534d5f5bbb0419a2bcb50b0547c9 (diff) | |
download | linux-3.10-9b03b06b65856f70564c53654d44053f3072379e.tar.gz linux-3.10-9b03b06b65856f70564c53654d44053f3072379e.tar.bz2 linux-3.10-9b03b06b65856f70564c53654d44053f3072379e.zip |
forcedeth: remove unnecessary checks before kfree
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 87757c89cae..81722fb51a3 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -1013,10 +1013,8 @@ static void free_rings(struct net_device *dev) pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (np->rx_ring_size + np->tx_ring_size), np->rx_ring.ex, np->ring_addr); } - if (np->rx_skb) - kfree(np->rx_skb); - if (np->tx_skb) - kfree(np->tx_skb); + kfree(np->rx_skb); + kfree(np->tx_skb); } static int using_multi_irqs(struct net_device *dev) @@ -4442,10 +4440,9 @@ static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ri pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (ring->rx_pending + ring->tx_pending), rxtx_ring, ring_addr); } - if (rx_skbuff) - kfree(rx_skbuff); - if (tx_skbuff) - kfree(tx_skbuff); + + kfree(rx_skbuff); + kfree(tx_skbuff); goto exit; } |