aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/vhost.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-22 10:40:48 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-10-09 08:36:23 +0200
commit805d44961b9015716cc13c1d3e49457af3970d82 (patch)
tree3787668026828fef8cef138ee4f4fa366401dc5e /hw/virtio/vhost.c
parent2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0 (diff)
error: Use error_fatal to simplify obvious fatal errors (again)
Patch created mechanically by rerunning: $ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h --use-gitgrep . Variables now unused dropped manually. Cc: Eric Auger <eric.auger@redhat.com> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200722084048.1726105-5-armbru@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'hw/virtio/vhost.c')
-rw-r--r--hw/virtio/vhost.c10
1 files changed, 3 insertions, 7 deletions
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? */
}