All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: 'Marc Kleine-Budde' <mkl@pengutronix.de>
Cc: 'Wolfgang Grandegger' <wg@grandegger.com>,
	linux-can@vger.kernel.org,
	'Federico Vaga' <federico.vaga@gmail.com>,
	'Alexander Stein' <alexander.stein@systec-electronic.com>,
	'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 1/3] can: c_can: remove unnecessary pci_set_drvdata()
Date: Tue, 10 Sep 2013 20:08:15 +0900	[thread overview]
Message-ID: <00a901ceae16$0c2d1e00$24875a00$%han@samsung.com> (raw)
In-Reply-To: <00a801ceae15$bb3daa50$31b8fef0$%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/can/c_can/c_can_pci.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index b374be7..bce0be5 100644
--- a/drivers/net/can/c_can/c_can_pci.c
+++ b/drivers/net/can/c_can/c_can_pci.c
@@ -160,7 +160,6 @@ static int c_can_pci_probe(struct pci_dev *pdev,
 	return 0;
 
 out_free_c_can:
-	pci_set_drvdata(pdev, NULL);
 	free_c_can_dev(dev);
 out_iounmap:
 	pci_iounmap(pdev, addr);
@@ -181,7 +180,6 @@ static void c_can_pci_remove(struct pci_dev *pdev)
 
 	unregister_c_can_dev(dev);
 
-	pci_set_drvdata(pdev, NULL);
 	free_c_can_dev(dev);
 
 	pci_iounmap(pdev, priv->base);
-- 
1.7.10.4



  reply	other threads:[~2013-09-10 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-10 11:08 ` Jingoo Han [this message]
2013-09-10 11:10 ` [PATCH 2/3] can: pch_can: " Jingoo Han
2013-09-10 11:12 ` [PATCH 3/3] can: sja1000: " Jingoo Han
2013-09-10 11:17 ` [PATCH 0/3] can: " Marc Kleine-Budde

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='00a901ceae16$0c2d1e00$24875a00$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=alexander.stein@systec-electronic.com \
    --cc=federico.vaga@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=wg@grandegger.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.