diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-10-09 14:47:44 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-10-09 14:47:45 +0100 |
commit | e1c30c43cd0bcb5c7a0877c7aa9ddc8f4a99afbc (patch) | |
tree | d57853edbd09d7db0129f179d1436037d045a4b2 /hw/virtio | |
parent | b7092cda1b36ce687e65ab1831346f9529b781b8 (diff) | |
parent | 805d44961b9015716cc13c1d3e49457af3970d82 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-10-09' into staging
Error reporting patches for 2020-10-09
# gpg: Signature made Fri 09 Oct 2020 07:45:17 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-2020-10-09:
error: Use error_fatal to simplify obvious fatal errors (again)
error: Remove NULL checks on error_propagate() calls (again)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/vhost.c | 10 |
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? */ } |