xen/pt: Make xen_pt_unregister_device idempotent
commitbce33948178e338eac2629284b199c0c1f05f8a3
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 8 Sep 2015 20:21:29 +0000 (8 16:21 -0400)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 10 Sep 2015 16:47:20 +0000 (10 16:47 +0000)
tree4252ac368e2768965b07a26a834ec227aa51e04a
parentfe2da64c5ab882124aaf14c27d62409d02ff1786
xen/pt: Make xen_pt_unregister_device idempotent

To deal with xen_host_pci_[set|get]_ functions returning error values
and clearing ourselves in the init function we should make the
.exit (xen_pt_unregister_device) function be idempotent in case
the generic code starts calling .exit (or for fun does it before
calling .init!).

Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen/xen-host-pci-device.c
hw/xen/xen-host-pci-device.h
hw/xen/xen_pt.c
hw/xen/xen_pt.h