* [PATCH -next] net: ena: Remove unnecessary pci_set_drvdata()
@ 2016-08-15 22:50 Wei Yongjun
2016-08-15 23:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-15 22:50 UTC (permalink / raw)
To: Netanel Belgazal, Saeed Bishara, Zorik Machulsky, David S. Miller
Cc: Wei Yongjun, netdev
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net: ena: Remove unnecessary pci_set_drvdata()
2016-08-15 22:50 [PATCH -next] net: ena: Remove unnecessary pci_set_drvdata() Wei Yongjun
@ 2016-08-15 23:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-15 23:34 UTC (permalink / raw)
To: weiyj.lk; +Cc: netanel, saeed, zorik, netdev
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 15 Aug 2016 22:50:34 +0000
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-15 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15 22:50 [PATCH -next] net: ena: Remove unnecessary pci_set_drvdata() Wei Yongjun
2016-08-15 23:34 ` David Miller
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).