summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-virtio-ccw.c7
-rw-r--r--hw/virtio/vhost.c10
2 files changed, 4 insertions, 13 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 28266a3a35..e52182f946 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -161,7 +161,6 @@ static void virtio_ccw_register_hcalls(void)
static void s390_memory_init(MemoryRegion *ram)
{
MemoryRegion *sysmem = get_system_memory();
- Error *local_err = NULL;
/* allocate RAM for core */
memory_region_add_subregion(sysmem, 0, ram);
@@ -170,11 +169,7 @@ static void s390_memory_init(MemoryRegion *ram)
* Configure the maximum page size. As no memory devices were created
* yet, this is the page size of initial memory only.
*/
- s390_set_max_pagesize(qemu_maxrampagesize(), &local_err);
- if (local_err) {
- error_report_err(local_err);
- exit(EXIT_FAILURE);
- }
+ s390_set_max_pagesize(qemu_maxrampagesize(), &error_fatal);
/* Initialize storage key device */
s390_skeys_init();
/* Initialize storage attributes device */
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 68f0a75134..3077fa6ef5 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -712,9 +712,8 @@ static void vhost_iommu_region_add(MemoryListener *listener,
iommu_listener);
struct vhost_iommu *iommu;
Int128 end;
- int iommu_idx, ret;
+ int iommu_idx;
IOMMUMemoryRegion *iommu_mr;
- Error *err = NULL;
if (!memory_region_is_iommu(section->mr)) {
return;
@@ -737,11 +736,8 @@ static void vhost_iommu_region_add(MemoryListener *listener,
iommu->iommu_offset = section->offset_within_address_space -
section->offset_within_region;
iommu->hdev = dev;
- ret = memory_region_register_iommu_notifier(section->mr, &iommu->n, &err);
- if (ret) {
- error_report_err(err);
- exit(1);
- }
+ memory_region_register_iommu_notifier(section->mr, &iommu->n,
+ &error_fatal);
QLIST_INSERT_HEAD(&dev->iommu_list, iommu, iommu_next);
/* TODO: can replay help performance here? */
}