From: Will Deacon Date: Fri, 12 Jul 2024 15:35:25 +0000 (+0100) Subject: iommu/tegra-smmu: Pass correct fwnode to iommu_fwspec_init() X-Git-Tag: io_uring-6.11-20240722~23^2~6^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=eac93f4d4ec63423704657895ce9a4ddac7b023b;p=linux-block.git 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: Jon Hunter Suggested-by: Robin Murphy Link: https://lore.kernel.org/r/0eec5f84-6b39-43ba-ab2f-914688a5cf45@nvidia.com Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index f86c7ae91814..c0c6dbd87fca 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -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;