diff options
-rw-r--r-- | drivers/iommu/iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index ffeebda8d6de..bce70abe8d35 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -898,6 +898,10 @@ void iommu_group_remove_device(struct device *dev) struct iommu_group *group = dev->iommu_group; struct group_device *tmp_device, *device = NULL; + /* Avoid crash if iommu_group value is null */ + if (!group) + return; + dev_info(dev, "Removing from iommu group %d\n", group->id); /* Pre-notify listeners that a device is being removed. */ |