Commit 1dea992d authored by Wei Yongjun's avatar Wei Yongjun Committed by Thadeu Lima de Souza Cascardo

net: ena: Remove unnecessary pci_set_drvdata()

BugLink: http://bugs.launchpad.net/bugs/1664312

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: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit 557bc7d4)
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 80c7b48a
......@@ -3060,7 +3060,6 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment