Staging: et131x: Take a kref for the PCI pointer we cache
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
5ec3487ac5
Коммит
6ae56042c1
|
@ -742,6 +742,7 @@ void __devexit et131x_pci_remove(struct pci_dev *pdev)
|
||||||
unregister_netdev(netdev);
|
unregister_netdev(netdev);
|
||||||
et131x_adapter_memory_free(adapter);
|
et131x_adapter_memory_free(adapter);
|
||||||
iounmap(adapter->CSRAddress);
|
iounmap(adapter->CSRAddress);
|
||||||
|
pci_dev_put(adapter->pdev);
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
pci_release_regions(pdev);
|
pci_release_regions(pdev);
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
@ -878,7 +879,7 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev,
|
||||||
|
|
||||||
/* Allocate private adapter struct and copy in relevant information */
|
/* Allocate private adapter struct and copy in relevant information */
|
||||||
adapter = netdev_priv(netdev);
|
adapter = netdev_priv(netdev);
|
||||||
adapter->pdev = pdev;
|
adapter->pdev = pci_dev_get(pdev);
|
||||||
adapter->netdev = netdev;
|
adapter->netdev = netdev;
|
||||||
|
|
||||||
/* Do the same for the netdev struct */
|
/* Do the same for the netdev struct */
|
||||||
|
@ -1022,6 +1023,7 @@ err_mem_free:
|
||||||
err_iounmap:
|
err_iounmap:
|
||||||
iounmap(adapter->CSRAddress);
|
iounmap(adapter->CSRAddress);
|
||||||
err_free_dev:
|
err_free_dev:
|
||||||
|
pci_dev_put(pdev);
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
err_release_res:
|
err_release_res:
|
||||||
pci_release_regions(pdev);
|
pci_release_regions(pdev);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче