]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/tegra: fix device leak on probe_device()
authorJohan Hovold <johan@kernel.org>
Mon, 20 Oct 2025 04:53:18 +0000 (06:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:10:00 +0000 (13:10 +0100)
commit3f50e9dbfe9d1b60c886f39c8311db3d5524a269
tree4b658b4643cdefab53e2b509a9f4814dee774f04
parent157b01742a681791a59d7ee2f5fff200ef38ab52
iommu/tegra: fix device leak on probe_device()

commit c08934a61201db8f1d1c66fcc63fb2eb526b656d upstream.

Make sure to drop the reference taken to the iommu platform device when
looking up its driver data during probe_device().

Note that commit 9826e393e4a8 ("iommu/tegra-smmu: Fix missing
put_device() call in tegra_smmu_find") fixed the leak in an error path,
but the reference is still leaking on success.

Fixes: 891846516317 ("memory: Add NVIDIA Tegra memory controller support")
Cc: stable@vger.kernel.org # 3.19: 9826e393e4a8
Cc: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/tegra-smmu.c