mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
virtio: pci: 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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
af91706d5d
commit
7d2dddda5c
@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
|
||||
return 0;
|
||||
|
||||
out_set_drvdata:
|
||||
pci_set_drvdata(pci_dev, NULL);
|
||||
pci_iounmap(pci_dev, vp_dev->ioaddr);
|
||||
out_req_regions:
|
||||
pci_release_regions(pci_dev);
|
||||
@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
|
||||
unregister_virtio_device(&vp_dev->vdev);
|
||||
|
||||
vp_del_vqs(&vp_dev->vdev);
|
||||
pci_set_drvdata(pci_dev, NULL);
|
||||
pci_iounmap(pci_dev, vp_dev->ioaddr);
|
||||
pci_release_regions(pci_dev);
|
||||
pci_disable_device(pci_dev);
|
||||
|
Loading…
Reference in New Issue
Block a user