net: ena: Remove unnecessary pci_set_drvdata()
Subsystems (3)
PATCH 1/1 net: ena: Remove unnecessary pci_set_drvdata()
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 <[email protected]>
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +0 -3
@@ -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);
From: Wei Yongjun <[email protected]>
Date: Mon, 15 Aug 2016 22:50:34 +0000
Quoted 5 lines
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Wei Yongjun <[email protected]>
Applied.