From: Jingoo Han Date: Tue, 10 Sep 2013 11:25:11 +0000 (+0900) Subject: wireless: ath10k: remove unnecessary pci_set_drvdata() X-Git-Tag: accepted/tizen/common/20141203.182822~1141^2~225^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1348088d6ff39c3b2c560da339eaf6284df95664;p=platform%2Fkernel%2Flinux-arm64.git wireless: ath10k: remove unnecessary pci_set_drvdata() 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 622901d..56501f4 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -2520,7 +2520,6 @@ err_region: err_device: pci_disable_device(pdev); err_ar: - pci_set_drvdata(pdev, NULL); ath10k_core_destroy(ar); err_ar_pci: /* call HIF PCI free here */ @@ -2548,7 +2547,6 @@ static void ath10k_pci_remove(struct pci_dev *pdev) ath10k_core_unregister(ar); - pci_set_drvdata(pdev, NULL); pci_iounmap(pdev, ar_pci->mem); pci_release_region(pdev, BAR_NUM); pci_clear_master(pdev);