net: qlcnic: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 22 Oct 2013 04:16:08 +0000 (13:16 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Oct 2013 06:11:51 +0000 (02:11 -0400)
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 027483292932f364ffe9d03cd6c51d4c980316c9..24e6b1123d86e4ba9ebd032378d38c3332e0a03e 100644 (file)
@@ -2406,7 +2406,6 @@ err_out_free_res:
        pci_release_regions(pdev);
 
 err_out_disable_pdev:
-       pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
        return err;
 
@@ -2482,7 +2481,6 @@ static void qlcnic_remove(struct pci_dev *pdev)
        pci_disable_pcie_error_reporting(pdev);
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-       pci_set_drvdata(pdev, NULL);
 
        if (adapter->qlcnic_wq) {
                destroy_workqueue(adapter->qlcnic_wq);