> > @@ -818,10 +819,13 @@ static void xen_pt_unregister_device(PCIDevice *d) > > { > > XenPCIPassthroughState *s = XEN_PT_DEVICE(d); > > uint8_t machine_irq = s->machine_irq; > > - uint8_t intx = xen_pt_pci_intx(s); > > + uint8_t intx; > > int rc; > > > > - if (machine_irq) { > > + /* Note that if xen_host_pci_device_put had closed config_fd, then > > + * intx value becomes 0xff. */ > > + intx = xen_pt_pci_intx(s); > > Wouldn't it make sense to move this assignment inside the if below?
Totally. Plus it also allows me to remove the comment above. > > Aside from this small item: > > Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> Thank you.