net: tulip: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 21 Oct 2013 02:09:26 +0000 (11:09 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2013 21:21:00 +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/dec/tulip/de2104x.c
drivers/net/ethernet/dec/tulip/dmfe.c
drivers/net/ethernet/dec/tulip/tulip_core.c
drivers/net/ethernet/dec/tulip/uli526x.c
drivers/net/ethernet/dec/tulip/winbond-840.c
drivers/net/ethernet/dec/tulip/xircom_cb.c

index eaab73cf27caffbbabb2904c47be6fc7941f5303..38148b0e3a952a348977de0b2d459b9b4436eee6 100644 (file)
@@ -2110,7 +2110,6 @@ static void de_remove_one(struct pci_dev *pdev)
        iounmap(de->regs);
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
 }
 
index 83139307861cd720edfd78d71d7abbe6b2265ff5..5ad9e3e3c0b8a5095564ae4c4369c3ac531c9591 100644 (file)
@@ -523,7 +523,6 @@ err_out_res:
 err_out_disable:
        pci_disable_device(pdev);
 err_out_free:
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
 
        return err;
@@ -548,8 +547,6 @@ static void dmfe_remove_one(struct pci_dev *pdev)
                                        db->buf_pool_ptr, db->buf_pool_dma_ptr);
                pci_release_regions(pdev);
                free_netdev(dev);       /* free board information */
-
-               pci_set_drvdata(pdev, NULL);
        }
 
        DMFE_DBUG(0, "dmfe_remove_one() exit", 0);
index 4e8cfa2ac803abb13c9c692ef971618cc26d664b..add05f14b38be17311f3344bd23860064fac8ce1 100644 (file)
@@ -1939,7 +1939,6 @@ static void tulip_remove_one(struct pci_dev *pdev)
        pci_iounmap(pdev, tp->base_addr);
        free_netdev (dev);
        pci_release_regions (pdev);
-       pci_set_drvdata (pdev, NULL);
 
        /* pci_power_off (pdev, -1); */
 }
index 93845afe1cea105f21751c4bea54100405799b42..a5397b130724faa9bb4fb9d54881226eb03695bd 100644 (file)
@@ -429,7 +429,6 @@ err_out_release:
 err_out_disable:
        pci_disable_device(pdev);
 err_out_free:
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
 
        return err;
@@ -450,7 +449,6 @@ static void uli526x_remove_one(struct pci_dev *pdev)
                                db->buf_pool_ptr, db->buf_pool_dma_ptr);
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-       pci_set_drvdata(pdev, NULL);
        free_netdev(dev);
 }
 
index c7b04ecf5b497ea26f969ce52eeaffccfc0ee5ef..62fe512bb2167fb682f63e26e2678e6a5df0cb6d 100644 (file)
@@ -468,7 +468,6 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
        return 0;
 
 err_out_cleardev:
-       pci_set_drvdata(pdev, NULL);
        pci_iounmap(pdev, ioaddr);
 err_out_free_res:
        pci_release_regions(pdev);
@@ -1542,8 +1541,6 @@ static void w840_remove1(struct pci_dev *pdev)
                pci_iounmap(pdev, np->base_addr);
                free_netdev(dev);
        }
-
-       pci_set_drvdata(pdev, NULL);
 }
 
 #ifdef CONFIG_PM
index 9b84cb04fe5fccded9f26fe010cf16ea6bb36c8a..ab7ebac6fbea0e6fe579b29d398b2c73fc369d4b 100644 (file)
@@ -289,7 +289,6 @@ out:
 err_unmap:
        pci_iounmap(pdev, private->ioaddr);
 reg_fail:
-       pci_set_drvdata(pdev, NULL);
        dma_free_coherent(d, 8192, private->tx_buffer, private->tx_dma_handle);
 tx_buf_fail:
        dma_free_coherent(d, 8192, private->rx_buffer, private->rx_dma_handle);
@@ -317,7 +316,6 @@ static void xircom_remove(struct pci_dev *pdev)
 
        unregister_netdev(dev);
        pci_iounmap(pdev, card->ioaddr);
-       pci_set_drvdata(pdev, NULL);
        dma_free_coherent(d, 8192, card->tx_buffer, card->tx_dma_handle);
        dma_free_coherent(d, 8192, card->rx_buffer, card->rx_dma_handle);
        free_netdev(dev);