netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] net: hippi: remove unnecessary pci_set_drvdata()
@ 2013-12-10  3:48 Jingoo Han
  2013-12-10  3:49 ` [PATCH 2/7] net: fddi: " Jingoo Han
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jingoo Han @ 2013-12-10  3:48 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, linux-hippi, 'Jes Sorensen', 'Jingoo Han'

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>
---
 drivers/net/hippi/rrunner.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 00ed751..cd85f24 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -213,10 +213,8 @@ static int rr_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 				    rrpriv->tx_ring_dma);
 	if (rrpriv->regs)
 		pci_iounmap(pdev, rrpriv->regs);
-	if (pdev) {
+	if (pdev)
 		pci_release_regions(pdev);
-		pci_set_drvdata(pdev, NULL);
-	}
  out2:
 	free_netdev(dev);
  out3:
@@ -244,7 +242,6 @@ static void rr_remove_one(struct pci_dev *pdev)
 	pci_iounmap(pdev, rr->regs);
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
-	pci_set_drvdata(pdev, NULL);
 	free_netdev(dev);
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-11  3:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10  3:48 [PATCH 1/7] net: hippi: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-10  3:49 ` [PATCH 2/7] net: fddi: " Jingoo Han
2013-12-10  3:50 ` [PATCH 3/7] net: vmxnet3: " Jingoo Han
2013-12-10  4:37   ` Shreyas Bhatewara
2013-12-10  4:53     ` Jingoo Han
2013-12-10  3:50 ` [PATCH 4/7] net: phy: spi_ks8995: remove unnecessary spi_set_drvdata() Jingoo Han
2013-12-10  3:51 ` [PATCH 5/7] net: ieee802154: " Jingoo Han
2013-12-10  3:51 ` [PATCH 6/7] atm: he: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-10  3:52 ` [PATCH 7/7] atm: solos-pci: " Jingoo Han
2013-12-11  3:32 ` [PATCH 1/7] net: hippi: " David Miller
2013-12-11  3:35   ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).