Commit 9b03b06b authored by Szymon Janc's avatar Szymon Janc Committed by David S. Miller

forcedeth: remove unnecessary checks before kfree

Signed-off-by: default avatarSzymon Janc <szymon@janc.net.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78aea4fc
...@@ -1013,9 +1013,7 @@ static void free_rings(struct net_device *dev) ...@@ -1013,9 +1013,7 @@ 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), 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); np->rx_ring.ex, np->ring_addr);
} }
if (np->rx_skb)
kfree(np->rx_skb); kfree(np->rx_skb);
if (np->tx_skb)
kfree(np->tx_skb); kfree(np->tx_skb);
} }
...@@ -4442,9 +4440,8 @@ static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ri ...@@ -4442,9 +4440,8 @@ 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), pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (ring->rx_pending + ring->tx_pending),
rxtx_ring, ring_addr); rxtx_ring, ring_addr);
} }
if (rx_skbuff)
kfree(rx_skbuff); kfree(rx_skbuff);
if (tx_skbuff)
kfree(tx_skbuff); kfree(tx_skbuff);
goto exit; goto exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment