提交 fff4c9c3 编写于 作者: M Markus Armbruster

xen/pt: Fix incomplete conversion to realize()

The conversion of "xen-pci-passthrough" to realize() (commit
5a11d0f7, v2.6.0) neglected to convert the xen_pt_config_init()
error path.  If xen_pt_config_init() fails, xen_pt_realize() reports
the error, then returns success without completing its job.  I don't
know the exact impact, but it can't be good.

Belatedly convert the error path.

Fixes: 5a11d0f7
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Acked-by: NAnthony PERARD <anthony.perard@citrix.com>
Message-Id: <20181017082702.5581-17-armbru@redhat.com>
上级 a22528b9
...@@ -830,7 +830,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp) ...@@ -830,7 +830,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
xen_pt_config_init(s, &err); xen_pt_config_init(s, &err);
if (err) { if (err) {
error_append_hint(&err, "PCI Config space initialisation failed"); error_append_hint(&err, "PCI Config space initialisation failed");
error_report_err(err); error_propagate(errp, err);
rc = -1; rc = -1;
goto err_out; goto err_out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册