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 2/7] net: niu: remove unnecessary pci_set_drvdata()
Date: Wed, 23 Oct 2013 16:07:19 +0900	[thread overview]
Message-ID: <000301cecfbe$834e84a0$89eb8de0$%han@samsung.com> (raw)
In-Reply-To: <000001cecfbe$44ce9c10$ce6bd430$%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/sun/niu.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index f28460c..388540f 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -9875,7 +9875,6 @@ err_out_free_res:
 
 err_out_disable_pdev:
 	pci_disable_device(pdev);
-	pci_set_drvdata(pdev, NULL);
 
 	return err;
 }
@@ -9900,7 +9899,6 @@ static void niu_pci_remove_one(struct pci_dev *pdev)
 		free_netdev(dev);
 		pci_release_regions(pdev);
 		pci_disable_device(pdev);
-		pci_set_drvdata(pdev, NULL);
 	}
 }
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-10-23  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  7:05 [PATCH 0/7] net: ethernet: remove unnecessary pci_set_drvdata() part 4 Jingoo Han
2013-10-23  7:06 ` [PATCH 1/7] net: sungem: remove unnecessary pci_set_drvdata() Jingoo Han
2013-10-23  7:07 ` Jingoo Han [this message]
2013-10-23  7:07 ` [PATCH 3/7] net: tehuti: " Jingoo Han
2013-10-23  7:08 ` [PATCH 4/7] net: tlan: " Jingoo Han
2013-10-23  7:09 ` [PATCH 5/7] net: spider_net: " Jingoo Han
2013-10-23  7:09 ` [PATCH 6/7] net: tc35815: " Jingoo Han
2013-10-23  7:09 ` [PATCH 7/7] net: via-rhine: " 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='000301cecfbe$834e84a0$89eb8de0$%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).