net: packetengines: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 21 Oct 2013 02:17:07 +0000 (11:17 +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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/packetengines/hamachi.c
drivers/net/ethernet/packetengines/yellowfin.c

index cac33e5f9bc2635cd2a4fd9b38c1af6f155164d8..b6bdeb3c19711ac960646dfdbeef2207b86f366d 100644 (file)
@@ -1910,7 +1910,6 @@ static void hamachi_remove_one(struct pci_dev *pdev)
                iounmap(hmp->base);
                free_netdev(dev);
                pci_release_regions(pdev);
-               pci_set_drvdata(pdev, NULL);
        }
 }
 
index d28593b1fc3e8664b1f6aad8e6d53dba4fdd1a5c..07a890eb72ad8677a47782f84f79c6f02ee1140e 100644 (file)
@@ -513,7 +513,6 @@ err_out_unmap_rx:
 err_out_unmap_tx:
         pci_free_consistent(pdev, TX_TOTAL_SIZE, np->tx_ring, np->tx_ring_dma);
 err_out_cleardev:
-       pci_set_drvdata(pdev, NULL);
        pci_iounmap(pdev, ioaddr);
 err_out_free_res:
        pci_release_regions(pdev);
@@ -1392,7 +1391,6 @@ static void yellowfin_remove_one(struct pci_dev *pdev)
        pci_release_regions (pdev);
 
        free_netdev (dev);
-       pci_set_drvdata(pdev, NULL);
 }