x86: fix emuirq regression from XSA-21 fix The XSA-21 patch broke the assumption of "ret" being zero prior to the IRQ_UNBOUND check. Signed-off-by: Jan Beulich --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -243,6 +243,8 @@ static int physdev_unmap_pirq(struct phy spin_lock(&d->event_lock); if ( domain_pirq_to_emuirq(d, unmap->pirq) != IRQ_UNBOUND ) ret = unmap_domain_pirq_emuirq(d, unmap->pirq); + else + ret = 0; spin_unlock(&d->event_lock); if ( unmap->domid == DOMID_SELF || ret ) goto free_domain;