diff options
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 79a31e5b4b68..3d1bf41e8892 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -594,11 +594,11 @@ static struct virtio_config_ops virtio_pci_config_ops = { | |||
594 | 594 | ||
595 | static void virtio_pci_release_dev(struct device *_d) | 595 | static void virtio_pci_release_dev(struct device *_d) |
596 | { | 596 | { |
597 | struct virtio_device *dev = container_of(_d, struct virtio_device, | 597 | /* |
598 | dev); | 598 | * No need for a release method as we allocate/free |
599 | struct virtio_pci_device *vp_dev = to_vp_device(dev); | 599 | * all devices together with the pci devices. |
600 | 600 | * Provide an empty one to avoid getting a warning from core. | |
601 | kfree(vp_dev); | 601 | */ |
602 | } | 602 | } |
603 | 603 | ||
604 | /* the PCI probing function */ | 604 | /* the PCI probing function */ |
@@ -686,6 +686,7 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev) | |||
686 | pci_iounmap(pci_dev, vp_dev->ioaddr); | 686 | pci_iounmap(pci_dev, vp_dev->ioaddr); |
687 | pci_release_regions(pci_dev); | 687 | pci_release_regions(pci_dev); |
688 | pci_disable_device(pci_dev); | 688 | pci_disable_device(pci_dev); |
689 | kfree(vp_dev); | ||
689 | } | 690 | } |
690 | 691 | ||
691 | #ifdef CONFIG_PM | 692 | #ifdef CONFIG_PM |