From: Jingoo Han Date: Mon, 21 Oct 2013 02:14:45 +0000 (+0900) Subject: net: ksz884x: remove unnecessary pci_set_drvdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c95984083a656fb82b9e1500748fd0b3f2d1d28c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: ksz884x: 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: David S. Miller --- diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 8ebc352bcbe6..6462dc5191ef 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c @@ -7150,8 +7150,6 @@ static void pcidev_exit(struct pci_dev *pdev) struct platform_info *info = pci_get_drvdata(pdev); struct dev_info *hw_priv = &info->dev_info; - pci_set_drvdata(pdev, NULL); - release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); for (i = 0; i < hw_priv->hw.dev_count; i++) {