mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
iommu/apple-dart: fix device leak on of_xlate()
Make sure to drop the reference taken to the iommu platform device when
looking up its driver data during of_xlate().
Fixes: 46d1fb072e ("iommu/dart: Add DART iommu driver")
Cc: stable@vger.kernel.org # 5.15
Cc: Sven Peter <sven@kernel.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
committed by
Joerg Roedel
parent
4fd2467686
commit
a6eaa872c5
@@ -805,6 +805,8 @@ static int apple_dart_of_xlate(struct device *dev,
|
||||
struct apple_dart *cfg_dart;
|
||||
int i, sid;
|
||||
|
||||
put_device(&iommu_pdev->dev);
|
||||
|
||||
if (args->args_count != 1)
|
||||
return -EINVAL;
|
||||
sid = args->args[0];
|
||||
|
||||
Reference in New Issue
Block a user