From: Wei Yongjun <weiyj.lk@gmail.com>
To: Sunil Goutham <sgoutham@cavium.com>, Robert Richter <rric@kernel.org>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH -next] net: thunderx: Remove unnecessary pci_set_drvdata()
Date: Mon, 15 Aug 2016 22:51:29 +0000 [thread overview]
Message-ID: <1471301489-24888-1-git-send-email-weiyj.lk@gmail.com> (raw)
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: Wei Yongjun <weiyj.lk@gmail.com>
---
drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
index 9210d04..67befed 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
@@ -194,7 +194,6 @@ err_release_regions:
err_disable_device:
pci_disable_device(pdev);
err_kfree:
- pci_set_drvdata(pdev, NULL);
devm_kfree(dev, xcv);
xcv = NULL;
return err;
@@ -211,7 +210,6 @@ static void xcv_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
}
static struct pci_driver xcv_driver = {
next reply other threads:[~2016-08-15 22:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 22:51 Wei Yongjun [this message]
2016-08-15 23:35 ` [PATCH -next] net: thunderx: Remove unnecessary pci_set_drvdata() David Miller
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=1471301489-24888-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=rric@kernel.org \
--cc=sgoutham@cavium.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 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).