mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
IOMMU: replace ASSERT()s checking for NULL
Avoid NULL derefs on non-debug builds. Coverity ID: 1055650 Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
4d86f9c099
commit
7b2842a414
1 file changed
+10
-2
@@ -165,7 +165,11 @@ static void pt_irq_time_out(void *data)
|
||||
spin_lock(&irq_map->dom->event_lock);
|
||||
|
||||
dpci = domain_get_irq_dpci(irq_map->dom);
|
||||
ASSERT(dpci);
|
||||
if ( unlikely(!dpci) )
|
||||
{
|
||||
ASSERT_UNREACHABLE();
|
||||
return;
|
||||
}
|
||||
list_for_each_entry ( digl, &irq_map->digl_list, list )
|
||||
{
|
||||
unsigned int guest_gsi = hvm_pci_intx_gsi(digl->device, digl->intx);
|
||||
@@ -793,7 +797,11 @@ void hvm_dpci_msi_eoi(struct domain *d, int vector)
|
||||
|
||||
static void hvm_dirq_assist(struct domain *d, struct hvm_pirq_dpci *pirq_dpci)
|
||||
{
|
||||
ASSERT(d->arch.hvm_domain.irq.dpci);
|
||||
if ( unlikely(!d->arch.hvm_domain.irq.dpci) )
|
||||
{
|
||||
ASSERT_UNREACHABLE();
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock(&d->event_lock);
|
||||
if ( test_and_clear_bool(pirq_dpci->masked) )
|
||||
|
||||