diff options
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r-- | hw/virtio-pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 31a68fec40..c6ef8254e3 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -547,7 +547,7 @@ static int virtio_blk_init_pci(PCIDevice *pci_dev) proxy->class_code != PCI_CLASS_STORAGE_OTHER) proxy->class_code = PCI_CLASS_STORAGE_SCSI; - if (!proxy->block.dinfo) { + if (!proxy->block.bs) { error_report("virtio-blk-pci: drive property not set"); return -1; } @@ -571,7 +571,7 @@ static int virtio_blk_exit_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); - blockdev_mark_auto_del(proxy->block.dinfo->bdrv); + blockdev_mark_auto_del(proxy->block.bs); return virtio_exit_pci(pci_dev); } |