Skip to content

Commit 6ca05bc

Browse files
committed
iommu/of: Free fwspec on probe deferrel
For devices with multiple iommus of_iommu_configure_device() potentially inits the fwspec for one of the iommus but another iommu device might have not yet been probe resulting in -EPROBE_DEFER. Clear the fwspec in such cases to ensure the next of_iommu_configure() call retries to configure all iommus. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent ddb7bbc commit 6ca05bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/iommu/of_iommu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np,
145145
of_pci_check_device_ats(dev, master_np);
146146
} else {
147147
err = of_iommu_configure_device(master_np, dev, id);
148+
if (err == -EPROBE_DEFER)
149+
iommu_fwspec_free(dev);
148150
}
149151

150152
if (err)

0 commit comments

Comments
 (0)