diff options
-rw-r--r-- | hw/virtio/virtio-pmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c index adbfb603ab..17c196d107 100644 --- a/hw/virtio/virtio-pmem.c +++ b/hw/virtio/virtio-pmem.c @@ -134,8 +134,8 @@ static void virtio_pmem_fill_device_info(const VirtIOPMEM *pmem, VirtioPMEMDeviceInfo *vi) { vi->memaddr = pmem->start; - vi->size = pmem->memdev ? memory_region_size(&pmem->memdev->mr) : 0; - vi->memdev = object_get_canonical_path(OBJECT(pmem->memdev)); + vi->size = memory_region_size(&pmem->memdev->mr); + vi->memdev = object_get_canonical_path(OBJECT(pmem->memdev)); } static MemoryRegion *virtio_pmem_get_memory_region(VirtIOPMEM *pmem, |