Commit eac93f4d authored by Will Deacon's avatar Will Deacon
Browse files

iommu/tegra-smmu: Pass correct fwnode to iommu_fwspec_init()



iommu_fwspec_init() expects to receive the fwnode corresponding to the
IOMMU device, not the fwnode corresponding to the client device being
probed.

Fix arm_smmu_configure() to pass the correct fwnode to
iommu_fwspec_init().

Reported-by: default avatarJon Hunter <jonathanh@nvidia.com>
Suggested-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/0eec5f84-6b39-43ba-ab2f-914688a5cf45@nvidia.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 83a7eefe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -837,7 +837,7 @@ static int tegra_smmu_configure(struct tegra_smmu *smmu, struct device *dev,
	const struct iommu_ops *ops = smmu->iommu.ops;
	int err;

	err = iommu_fwspec_init(dev, &dev->of_node->fwnode, ops);
	err = iommu_fwspec_init(dev, &smmu->dev->of_node->fwnode, ops);
	if (err < 0) {
		dev_err(dev, "failed to initialize fwspec: %d\n", err);
		return err;