net: neterion: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 21 Oct 2013 02:16:38 +0000 (11:16 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2013 21:21:02 +0000 (17:21 -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: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/s2io.c
drivers/net/ethernet/neterion/vxge/vxge-main.c

index 51b00941302c8d7e7eea3dcad6daa17c7702c65e..9eeddbd0b2c7c749de1c863e4b142c25f35c4fb9 100644 (file)
@@ -8185,7 +8185,6 @@ mem_alloc_failed:
        free_shared_mem(sp);
        pci_disable_device(pdev);
        pci_release_regions(pdev);
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
 
        return ret;
@@ -8221,7 +8220,6 @@ static void s2io_rem_nic(struct pci_dev *pdev)
        iounmap(sp->bar0);
        iounmap(sp->bar1);
        pci_release_regions(pdev);
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
        pci_disable_device(pdev);
 }
index 5a20eaf903dd8b8833262166e4be4e65abd6f674..8614eeb7de8140114d256ae05c62ce95d5844a18 100644 (file)
@@ -4739,7 +4739,6 @@ _exit6:
 _exit5:
        vxge_device_unregister(hldev);
 _exit4:
-       pci_set_drvdata(pdev, NULL);
        vxge_hw_device_terminate(hldev);
        pci_disable_sriov(pdev);
 _exit3:
@@ -4782,7 +4781,6 @@ static void vxge_remove(struct pci_dev *pdev)
                vxge_free_mac_add_list(&vdev->vpaths[i]);
 
        vxge_device_unregister(hldev);
-       pci_set_drvdata(pdev, NULL);
        /* Do not call pci_disable_sriov here, as it will break child devices */
        vxge_hw_device_terminate(hldev);
        iounmap(vdev->bar0);