Commit 22abe310 authored by Peter Hagervall's avatar Peter Hagervall Committed by David S. Miller
Browse files

[TG3]: Sparse fixes for tg3



Change 0 to NULL where appropriate.
Signed-off-by: default avatarPeter Hagervall <hager@cs.umu.se>
Acked-by: default avatarJeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8f39143
...@@ -9534,7 +9534,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) ...@@ -9534,7 +9534,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
tp->write32_rx_mbox = tg3_write_indirect_mbox; tp->write32_rx_mbox = tg3_write_indirect_mbox;
iounmap(tp->regs); iounmap(tp->regs);
tp->regs = 0; tp->regs = NULL;
pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
pci_cmd &= ~PCI_COMMAND_MEMORY; pci_cmd &= ~PCI_COMMAND_MEMORY;
...@@ -10682,7 +10682,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, ...@@ -10682,7 +10682,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
err_out_iounmap: err_out_iounmap:
if (tp->regs) { if (tp->regs) {
iounmap(tp->regs); iounmap(tp->regs);
tp->regs = 0; tp->regs = NULL;
} }
err_out_free_dev: err_out_free_dev:
...@@ -10707,7 +10707,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) ...@@ -10707,7 +10707,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev)
unregister_netdev(dev); unregister_netdev(dev);
if (tp->regs) { if (tp->regs) {
iounmap(tp->regs); iounmap(tp->regs);
tp->regs = 0; tp->regs = NULL;
} }
free_netdev(dev); free_netdev(dev);
pci_release_regions(pdev); pci_release_regions(pdev);
......
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