From b83baa6025d0bf921f2fc4514df4f60493ea41de Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 18 Dec 2015 16:35:16 +0100 Subject: [PATCH] spapr: Use error_reportf_err() Not caught by Coccinelle, because we report the error only conditionally here. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1450452927-8346-14-git-send-email-armbru@redhat.com> --- hw/ppc/spapr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0ca01767e5..091cdb1e1f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -122,10 +122,11 @@ static XICSState *xics_system_init(MachineState *machine, icp = try_create_xics(TYPE_KVM_XICS, nr_servers, nr_irqs, &err); } if (machine_kernel_irqchip_required(machine) && !icp) { - error_report("kernel_irqchip requested but unavailable: %s", - error_get_pretty(err)); + error_reportf_err(err, + "kernel_irqchip requested but unavailable: "); + } else { + error_free(err); } - error_free(err); } if (!icp) {