]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iommu/tegra-smmu: Fix missing put_device() call in tegra_smmu_find
authorMiaoqian Lin <linmq006@gmail.com>
Fri, 7 Jan 2022 08:09:11 +0000 (08:09 +0000)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 14:17:54 +0000 (15:17 +0100)
commit8a15f05b5f2562740f673dee6f12d5b11ddefcc4
treeccae54d7a5b3eed2af581eacd34150bd6fa07c8e
parent30236f2ee61b0ac078fa86eef73cc123b5b9a3d5
iommu/tegra-smmu: Fix missing put_device() call in tegra_smmu_find

BugLink: https://bugs.launchpad.net/bugs/1964361
commit 9826e393e4a8c3df474e7f9eacd3087266f74005 upstream.

The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the error handling path.

Fixes: 765a9d1d02b2 ("iommu/tegra-smmu: Fix mc errors on tegra124-nyan")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20220107080915.12686-1-linmq006@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/iommu/tegra-smmu.c