ivshmem: Fix harmless misuse of Error
commit9cf70c52253ccadc137d40eb0de2c0f25a127334
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Mar 2016 18:34:31 +0000 (15 19:34 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 21 Mar 2016 20:29:00 +0000 (21 21:29 +0100)
tree4645cecc9e6736b1800202436d4497b1f4d8f3d5
parent71c265816dd2772f89ebb377381c836dfca09d70
ivshmem: Fix harmless misuse of Error

We reuse errp after passing it host_memory_backend_get_memory().  If
both host_memory_backend_get_memory() and the reuse set an error, the
reuse will fail the assertion in error_setv().  Fortunately,
host_memory_backend_get_memory() can't fail.

Pass it &error_abort to make our assumption explicit, and to get the
assertion failure in the right place should it become invalid.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1458066895-20632-17-git-send-email-armbru@redhat.com>
hw/misc/ivshmem.c