diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-10-28 16:53:13 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 16:53:13 -0400 |
commit | b4558ea93d66a43f7990d26f145fd4c54a01c9bf (patch) | |
tree | 70aa8ba4864f8ee994b7f5278f5045af6a646d34 /drivers/net/tulip | |
parent | 7380a78a973a8109c13cb0e47617c456b6f6e1f5 (diff) | |
download | kernel_samsung_espresso10-b4558ea93d66a43f7990d26f145fd4c54a01c9bf.zip kernel_samsung_espresso10-b4558ea93d66a43f7990d26f145fd4c54a01c9bf.tar.gz kernel_samsung_espresso10-b4558ea93d66a43f7990d26f145fd4c54a01c9bf.tar.bz2 |
drivers/net: Remove pointless checks for NULL prior to calling kfree()
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/de2104x.c | 6 | ||||
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 6b8eee8..d7fb3ff 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -2076,8 +2076,7 @@ static int __init de_init_one (struct pci_dev *pdev, return 0; err_out_iomap: - if (de->ee_data) - kfree(de->ee_data); + kfree(de->ee_data); iounmap(regs); err_out_res: pci_release_regions(pdev); @@ -2096,8 +2095,7 @@ static void __exit de_remove_one (struct pci_dev *pdev) if (!dev) BUG(); unregister_netdev(dev); - if (de->ee_data) - kfree(de->ee_data); + kfree(de->ee_data); iounmap(de->regs); pci_release_regions(pdev); pci_disable_device(pdev); diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 6266a9a..125ed00 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c @@ -1727,8 +1727,7 @@ err_out_free_ring: tp->rx_ring, tp->rx_ring_dma); err_out_mtable: - if (tp->mtable) - kfree (tp->mtable); + kfree (tp->mtable); pci_iounmap(pdev, ioaddr); err_out_free_res: @@ -1806,8 +1805,7 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev) sizeof (struct tulip_rx_desc) * RX_RING_SIZE + sizeof (struct tulip_tx_desc) * TX_RING_SIZE, tp->rx_ring, tp->rx_ring_dma); - if (tp->mtable) - kfree (tp->mtable); + kfree (tp->mtable); pci_iounmap(pdev, tp->base_addr); free_netdev (dev); pci_release_regions (pdev); |