From: Wei Yongjun <weiyj.lk@gmail.com>
To: Netanel Belgazal <netanel@annapurnalabs.com>,
Saeed Bishara <saeed@annapurnalabs.com>,
Zorik Machulsky <zorik@annapurnalabs.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Wei Yongjun <weiyj.lk@gmail.com>, netdev@vger.kernel.org
Subject: [PATCH -next] net: ena: Remove unnecessary pci_set_drvdata()
Date: Mon, 15 Aug 2016 22:50:34 +0000 [thread overview]
Message-ID: <1471301434-24531-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/amazon/ena/ena_netdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 94790df..499a22b 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -3060,7 +3060,6 @@ err_device_destroy:
err_free_region:
ena_release_bars(ena_dev, pdev);
err_free_ena_dev:
- pci_set_drvdata(pdev, NULL);
vfree(ena_dev);
err_disable_device:
pci_disable_device(pdev);
@@ -3156,8 +3155,6 @@ static void ena_remove(struct pci_dev *pdev)
ena_release_bars(ena_dev, pdev);
- pci_set_drvdata(pdev, NULL);
-
pci_disable_device(pdev);
ena_com_destroy_interrupt_moderation(ena_dev);
next reply other threads:[~2016-08-15 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 22:50 Wei Yongjun [this message]
2016-08-15 23:34 ` [PATCH -next] net: ena: 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=1471301434-24531-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=davem@davemloft.net \
--cc=netanel@annapurnalabs.com \
--cc=netdev@vger.kernel.org \
--cc=saeed@annapurnalabs.com \
--cc=zorik@annapurnalabs.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).