diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d8376c2d18b3bf..c03b0dbf483d3f 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1565,6 +1565,10 @@ static void iommu_flush_dev_iotlb(struct dmar_domain *domain, u16 sid, qdep; unsigned long flags; struct device_domain_info *info; + + /* device has already been flushed/unmapped? */ + if (WARN_ON(!domain)) + return; if (!domain->has_iotlb_device) return;