From: Jingoo Han Date: Tue, 22 Oct 2013 04:17:11 +0000 (+0900) Subject: net: r6040: remove unnecessary pci_set_drvdata() X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~11397^2~146^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=726a2fbe7b02ef24a4aeaef7df905148fa03ba71;p=mirror_ubuntu-artful-kernel.git net: r6040: 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/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index e9dc84943cfc..1e49ec5b2232 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c @@ -1231,7 +1231,6 @@ err_out_mdio: mdiobus_free(lp->mii_bus); err_out_unmap: netif_napi_del(&lp->napi); - pci_set_drvdata(pdev, NULL); pci_iounmap(pdev, ioaddr); err_out_free_res: pci_release_regions(pdev); @@ -1257,7 +1256,6 @@ static void r6040_remove_one(struct pci_dev *pdev) pci_release_regions(pdev); free_netdev(dev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); }