pseries: Clean up error handling in spapr_validate_node_memory()
commit7c150d6f04f23dbcb4402bd5e16a8c86757a727a
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 25 Jan 2016 11:46:47 +0000 (25 22:46 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 30 Jan 2016 12:37:37 +0000 (30 23:37 +1100)
tree9645036dd9e65db57edd355a052791d582419afd
parent569f49671dde92bb2bf55d4d2f32537e04c3c7c8
pseries: Clean up error handling in spapr_validate_node_memory()

Use error_setg() and return an error, rather than using an explicit exit().

Also improve messages, and be more explicit about which constraint failed.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hw/ppc/spapr.c