diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-22 10:40:48 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-10-09 08:36:23 +0200 |
commit | 805d44961b9015716cc13c1d3e49457af3970d82 (patch) | |
tree | 3787668026828fef8cef138ee4f4fa366401dc5e /exec.c | |
parent | 2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0 (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 'exec.c')
-rw-r--r-- | exec.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -623,8 +623,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu, */ MemoryRegion *mr = MEMORY_REGION(iommu_mr); TCGIOMMUNotifier *notifier; - Error *err = NULL; - int i, ret; + int i; for (i = 0; i < cpu->iommu_notifiers->len; i++) { notifier = g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i); @@ -653,12 +652,8 @@ static void tcg_register_iommu_notifier(CPUState *cpu, 0, HWADDR_MAX, iommu_idx); - ret = memory_region_register_iommu_notifier(notifier->mr, ¬ifier->n, - &err); - if (ret) { - error_report_err(err); - exit(1); - } + memory_region_register_iommu_notifier(notifier->mr, ¬ifier->n, + &error_fatal); } if (!notifier->active) { |