A virtual device like "drm" call iommu_attach_device may fail.
Current only judge if a device has "group", this is not enough,
"group->iommu_data" is needed
Change-Id: I1a66d6016dfef867d83aa4cccaf223ced4e07161
Signed-off-by: Simon <xxm@rock-chips.com>
if (!group)
return NULL;
iommu_dev = iommu_group_get_iommudata(group);
+ if (!iommu_dev) {
+ dev_info(dev, "Possibly a virtual device\n");
+ return NULL;
+ }
+
rk_iommu = dev_get_drvdata(iommu_dev);
iommu_group_put(group);