mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
iommu/mediatek-v1: fix device leak on probe_device()
commitc77ad28bfeupstream. Make sure to drop the reference taken to the iommu platform device when looking up its driver data during probe_device(). Fixes:b17336c55d("iommu/mediatek: add support for mtk iommu generation one HW") Cc: stable@vger.kernel.org # 4.8 Cc: Honghui Zhang <honghui.zhang@mediatek.com> Acked-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Yong Wu <yong.wu@mediatek.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
83a8e18f30
commit
e7bcedf59b
@@ -420,6 +420,8 @@ static int mtk_iommu_v1_create_mapping(struct device *dev, struct of_phandle_arg
|
||||
return -EINVAL;
|
||||
|
||||
dev_iommu_priv_set(dev, platform_get_drvdata(m4updev));
|
||||
|
||||
put_device(&m4updev->dev);
|
||||
}
|
||||
|
||||
ret = iommu_fwspec_add_ids(dev, args->args, 1);
|
||||
|
||||
Reference in New Issue
Block a user