error: Use error_fatal to simplify obvious fatal errors (again)

We did this with scripts/coccinelle/use-error_fatal.cocci before, in
commit 50beeb6809 and 007b06578a.  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>
This commit is contained in:
Markus Armbruster 2021-07-20 14:53:53 +02:00
parent c83fcfaf8a
commit f9734d5d40
10 changed files with 13 additions and 56 deletions

View file

@ -1508,7 +1508,6 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
"This VM has no graphic display device.";
static DisplaySurface *dummy;
QemuConsole *con;
Error *err = NULL;
assert(!dcl->ds);
@ -1523,9 +1522,8 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
dcl->con->gl = dcl;
}
if (dcl->con && !dpy_compatible_with(dcl->con, dcl, &err)) {
error_report_err(err);
exit(1);
if (dcl->con) {
dpy_compatible_with(dcl->con, dcl, &error_fatal);
}
trace_displaychangelistener_register(dcl, dcl->ops->dpy_name);