Skip to content

Commit 31f73f4

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 82c9ac2 commit 31f73f4

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
@@ -149,6 +149,8 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np,
149149
of_pci_iommu_init, &info);
150150
} else {
151151
err = of_iommu_configure_device(master_np, dev, id);
152+
if (err == -EPROBE_DEFER)
153+
iommu_fwspec_free(dev);
152154
}
153155
mutex_unlock(&iommu_probe_device_lock);
154156

0 commit comments

Comments
 (0)