spapr: fix error reporting in xics_system_init()
commit3d85885a1b1f389d38ae3c71e439635207cfcf4d
authorGreg Kurz <groug@kaod.org>
Fri, 19 May 2017 10:32:12 +0000 (19 12:32 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 24 May 2017 01:39:53 +0000 (24 11:39 +1000)
tree076f09af81e0db8719e7c6073bd0f63dc56a1a2a
parent249127d0dfeb2cf5e24d9353b6d54c91c1666ddc
spapr: fix error reporting in xics_system_init()

If the user explicitely asked for kernel-irqchip support and "xics-kvm"
initialization fails, we shouldn't fallback to emulated "xics" as we
do now. It is also awkward to print an error message when we have an
errp pointer argument.

Let's use the errp argument to report the error and let the caller decide.
This simplifies the code as we don't need a local Error * here.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c