net: r6040: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 22 Oct 2013 04:17:11 +0000 (13:17 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Oct 2013 06:11:52 +0000 (02:11 -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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rdc/r6040.c

index e9dc84943cfcb5fa39a8031e5a28051f5963da90..1e49ec5b22324815005bcefcfcbd9eef6e46facc 100644 (file)
@@ -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);
 }