Skip to content

Commit

Permalink
xen/pt: Fix incomplete conversion to realize()
Browse files Browse the repository at this point in the history
The conversion of "xen-pci-passthrough" to realize() (commit
5a11d0f, 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: 5a11d0f
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20181017082702.5581-17-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Oct 19, 2018
1 parent a22528b commit fff4c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/xen/xen_pt.c
Expand Up @@ -830,7 +830,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
xen_pt_config_init(s, &err);
if (err) {
error_append_hint(&err, "PCI Config space initialisation failed");
error_report_err(err);
error_propagate(errp, err);
rc = -1;
goto err_out;
}
Expand Down

0 comments on commit fff4c9c

Please sign in to comment.