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>
Signed-off-by: David S. Miller <davem@davemloft.net>
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);
ena_release_bars(ena_dev, pdev);
- pci_set_drvdata(pdev, NULL);
-
pci_disable_device(pdev);
ena_com_destroy_interrupt_moderation(ena_dev);