FAILED: patch "[PATCH] iommu/tegra: fix device leak on probe_device()" failed to apply to 5.10-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x c08934a61201db8f1d1c66fcc63fb2eb526b656d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026010546-tannery-spinning-db08@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c08934a61201db8f1d1c66fcc63fb2eb526b656d Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 20 Oct 2025 06:53:18 +0200
Subject: [PATCH] iommu/tegra: fix device leak on probe_device()
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.
drivers/iommu/tegra-smmu.c +2 -3
@@ -830,10 +830,9 @@ static struct tegra_smmu *tegra_smmu_find(struct device_node *np)return NULL ; mc =platform_get_drvdata (pdev); -if (!mc) { -put_device (&pdev->dev); +put_device (&pdev->dev); +if (!mc)return NULL ; - }return mc->smmu; }