wireless: rt2x00: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 25 Nov 2013 01:52:33 +0000 (10:52 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 19:56:35 +0000 (14:56 -0500)
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>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00pci.c

index 25da20e7e1f34ab2c0b1fd3e38a82d1faece0f9e..af721831dcbc902af12cf872857b8a4134d6b086 100644 (file)
@@ -156,8 +156,6 @@ exit_release_regions:
 exit_disable_device:
        pci_disable_device(pci_dev);
 
-       pci_set_drvdata(pci_dev, NULL);
-
        return retval;
 }
 EXPORT_SYMBOL_GPL(rt2x00pci_probe);
@@ -177,7 +175,6 @@ void rt2x00pci_remove(struct pci_dev *pci_dev)
        /*
         * Free the PCI device data.
         */
-       pci_set_drvdata(pci_dev, NULL);
        pci_disable_device(pci_dev);
        pci_release_regions(pci_dev);
 }