diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-07-20 14:53:53 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-08-26 17:15:28 +0200 |
commit | f9734d5d4078f17daf328b9e113aaffe3d00ecaf (patch) | |
tree | f0c0f46f58e1576c34b86ed2ee9db13edd57645f /target/i386/sev.c | |
parent | c83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9 (diff) |
error: Use error_fatal to simplify obvious fatal errors (again)
We did this with scripts/coccinelle/use-error_fatal.cocci before, in
commit 50beeb68094 and 007b06578ab. This commit cleans up rarer
variations that don't seem worth matching with Coccinelle.
Cc: Thomas Huth <thuth@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210720125408.387910-2-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'target/i386/sev.c')
-rw-r--r-- | target/i386/sev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/target/i386/sev.c b/target/i386/sev.c index 83df8c09f6..0b2c8f594a 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -737,7 +737,6 @@ static void sev_launch_finish(SevGuestState *sev) { int ret, error; - Error *local_err = NULL; trace_kvm_sev_launch_finish(); ret = sev_ioctl(sev->sev_fd, KVM_SEV_LAUNCH_FINISH, 0, &error); @@ -752,12 +751,7 @@ sev_launch_finish(SevGuestState *sev) /* add migration blocker */ error_setg(&sev_mig_blocker, "SEV: Migration is not implemented"); - ret = migrate_add_blocker(sev_mig_blocker, &local_err); - if (local_err) { - error_report_err(local_err); - error_free(sev_mig_blocker); - exit(1); - } + migrate_add_blocker(sev_mig_blocker, &error_fatal); } static void |