From d50a6e58e83cdf534fd3f6c152c71b65973ab502 Mon Sep 17 00:00:00 2001 From: Cao jin Date: Sun, 17 Jan 2016 20:13:14 +0800 Subject: Add Error **errp for xen_pt_config_init() To catch the error message. Also modify the caller Signed-off-by: Cao jin Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'hw/xen/xen_pt.c') diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 07bfcec..9eef3df 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -825,9 +825,11 @@ static int xen_pt_initfn(PCIDevice *d) xen_pt_register_regions(s, &cmd); /* reinitialize each config register to be emulated */ - rc = xen_pt_config_init(s); - if (rc) { - XEN_PT_ERR(d, "PCI Config space initialisation failed.\n"); + xen_pt_config_init(s, &err); + if (err) { + error_append_hint(&err, "PCI Config space initialisation failed"); + error_report_err(err); + rc = -1; goto err_out; } -- cgit v1.1