wireless: rtlwifi: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 10 Sep 2013 11:18:38 +0000 (20:18 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 26 Sep 2013 19:13:41 +0000 (15:13 -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>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/pci.c

index 703f839af6ca0b4abefcfc754dc21eb3d13b2dac..2b6d3e0afef0fad22fce4aa3820fdb3b7ce91dec 100644 (file)
@@ -2009,7 +2009,6 @@ fail2:
 fail1:
        if (hw)
                ieee80211_free_hw(hw);
-       pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
 
        return err;
@@ -2064,8 +2063,6 @@ void rtl_pci_disconnect(struct pci_dev *pdev)
 
        rtl_pci_disable_aspm(hw);
 
-       pci_set_drvdata(pdev, NULL);
-
        ieee80211_free_hw(hw);
 }
 EXPORT_SYMBOL(rtl_pci_disconnect);