diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-12-02 15:14:01 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-12-03 22:50:26 -0500 |
commit | 7d2dddda5c928f349a01f1d5ca8ee5e9d4283c7a (patch) | |
tree | 9faa12df6934ec5c3856c0896dbf92f6c7318590 /drivers/virtio | |
parent | af91706d5ddecb4a9858cca9e90d463037cfd498 (diff) |
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>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index a37c69941d30..a416f9b2a7f6 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, | |||
742 | return 0; | 742 | return 0; |
743 | 743 | ||
744 | out_set_drvdata: | 744 | out_set_drvdata: |
745 | pci_set_drvdata(pci_dev, NULL); | ||
746 | pci_iounmap(pci_dev, vp_dev->ioaddr); | 745 | pci_iounmap(pci_dev, vp_dev->ioaddr); |
747 | out_req_regions: | 746 | out_req_regions: |
748 | pci_release_regions(pci_dev); | 747 | pci_release_regions(pci_dev); |
@@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) | |||
760 | unregister_virtio_device(&vp_dev->vdev); | 759 | unregister_virtio_device(&vp_dev->vdev); |
761 | 760 | ||
762 | vp_del_vqs(&vp_dev->vdev); | 761 | vp_del_vqs(&vp_dev->vdev); |
763 | pci_set_drvdata(pci_dev, NULL); | ||
764 | pci_iounmap(pci_dev, vp_dev->ioaddr); | 762 | pci_iounmap(pci_dev, vp_dev->ioaddr); |
765 | pci_release_regions(pci_dev); | 763 | pci_release_regions(pci_dev); |
766 | pci_disable_device(pci_dev); | 764 | pci_disable_device(pci_dev); |