Skip to content

Commit 46b14fc

Browse files
Tero Kristo via iommujoergroedel
authored andcommitted
iommu/omap: Add check for iommu group when no IOMMU in use
Most of the devices in OMAP family of SoCs are not using IOMMU. The patch for converting the OMAP IOMMU to use generic IOMMU bus probe functionality failed to add a check for this, so add it here. Fixes: c822b37 ("iommu/omap: Remove orphan_dev tracking") Reported-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tero Kristo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent ec9b40c commit 46b14fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/iommu/omap-iommu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,9 @@ static struct iommu_group *omap_iommu_device_group(struct device *dev)
17261726
struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
17271727
struct iommu_group *group = ERR_PTR(-EINVAL);
17281728

1729+
if (!arch_data)
1730+
return ERR_PTR(-ENODEV);
1731+
17291732
if (arch_data->iommu_dev)
17301733
group = iommu_group_ref_get(arch_data->iommu_dev->group);
17311734

0 commit comments

Comments
 (0)