Introduced by c/s
fba00494268 "x86/pt: enable binding of GSIs to a PVH Dom0"
Spotted by Coverity.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
/* MSI_TRANSLATE is not supported for the hardware domain. */
if ( pt_irq_bind->irq_type != PT_IRQ_TYPE_PCI ||
pirq >= hvm_domain_irq(d)->nr_gsis )
+ {
+ spin_unlock(&d->event_lock);
+
return -EINVAL;
+ }
guest_gsi = pirq;
}
if ( mask < 0 || trigger_mode < 0 )
{
+ spin_unlock(&d->event_lock);
+
ASSERT_UNREACHABLE();
return -EINVAL;
}