diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2016-01-17 20:13:14 +0800 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2016-01-21 16:45:47 +0000 |
commit | d50a6e58e83cdf534fd3f6c152c71b65973ab502 (patch) | |
tree | 7e0d20ca2f96ee3db8c0ff6901735585a7e5c74c /hw/xen/xen_pt.c | |
parent | 5226bb59f703963914e446557a2eea4a82eaf462 (diff) |
Add Error **errp for xen_pt_config_init()
To catch the error message. Also modify the caller
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen/xen_pt.c')
-rw-r--r-- | hw/xen/xen_pt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 07bfcecb63..9eef3dfef2 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; } |