Skip to content

Commit 1cd2f41

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 efd319b commit 1cd2f41

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
@@ -147,6 +147,8 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np,
147147
of_pci_check_device_ats(dev, master_np);
148148
} else {
149149
err = of_iommu_configure_device(master_np, dev, id);
150+
if (err == -EPROBE_DEFER)
151+
iommu_fwspec_free(dev);
150152
}
151153

152154
if (err)

0 commit comments

Comments
 (0)