Skip to content
Snippets Groups Projects
Commit fb38ebfb authored by Thomas Huth's avatar Thomas Huth Committed by David Gibson
Browse files

hw/pci-host/prep: Do not use hw_error() in realize function


hw_error() is for CPU related errors only (it prints out a
register dump and calls abort()), so we should not use it
if we just failed to load the bios image. Apart from that,
realize() functions should not exit directly but always set
the errp with error_setg() in case of errors instead.
Additionally, move some code around and delete the bios memory
subregion again in case of such an error, so that we leave a
clean state when returning to the caller.

Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarHervé Poussineau <hpoussin@reactos.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 50659083
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment