netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'David S. Miller'" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, 'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 5/5] net: forcedeth: remove unnecessary pci_set_drvdata()
Date: Mon, 09 Dec 2013 12:27:50 +0900	[thread overview]
Message-ID: <000701cef48e$a37a7cd0$ea6f7670$%han@samsung.com> (raw)
In-Reply-To: <000001cef48e$1ee3c4e0$5cab4ea0$%han@samsung.com>

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/ethernet/nvidia/forcedeth.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index ab67bab..d8bdaf6 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -6017,7 +6017,6 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
 out_error:
 	if (phystate_orig)
 		writel(phystate|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl);
-	pci_set_drvdata(pci_dev, NULL);
 out_freering:
 	free_rings(dev);
 out_unmap:
@@ -6088,7 +6087,6 @@ static void nv_remove(struct pci_dev *pci_dev)
 	pci_release_regions(pci_dev);
 	pci_disable_device(pci_dev);
 	free_netdev(dev);
-	pci_set_drvdata(pci_dev, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
1.7.10.4

  parent reply	other threads:[~2013-12-09  3:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09  3:24 [PATCH 1/5] net: sfc: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-09  3:25 ` [PATCH 2/5] net: sis900: " Jingoo Han
2013-12-09 23:09   ` David Miller
2013-12-09  3:26 ` [PATCH 3/5] net: bna: " Jingoo Han
2013-12-09 23:09   ` David Miller
2013-12-09  3:27 ` [PATCH 4/5] net: ns83820: " Jingoo Han
2013-12-09 23:10   ` David Miller
2013-12-09  3:27 ` Jingoo Han [this message]
2013-12-09 23:10   ` [PATCH 5/5] net: forcedeth: " David Miller
2013-12-09 23:09 ` [PATCH 1/5] net: sfc: " David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-11-25  1:43 Jingoo Han
2013-11-25  1:47 ` [PATCH 5/5] net: forcedeth: " Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000701cef48e$a37a7cd0$ea6f7670$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).