summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f82060e778a2..6070b1504497 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2204,7 +2204,8 @@ static void __detach_device(struct iommu_dev_data *dev_data)
struct protection_domain *domain;
unsigned long flags;
- BUG_ON(!dev_data->domain);
+ if (WARN_ON(!dev_data->domain))
+ return;
domain = dev_data->domain;