* [PATCH] iommu/mtk_iommu_v1: add missing put_device()
[not found] <20230718082500.17066-1-xujianghui@cdjrlc.com>
@ 2023-07-18 8:28 ` sunran001
0 siblings, 0 replies; only message in thread
From: sunran001 @ 2023-07-18 8:28 UTC (permalink / raw)
To: joro, will, matthias.bgg
Cc: iommu, linux-mediatek, linux-kernel, linux-arm-kernel
The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
./drivers/iommu/mtk_iommu_v1.c:669:3-9: ERROR: missing put_device; call
of_find_device_by_node on line 662, but without a corresponding object
release within this function.
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
drivers/iommu/mtk_iommu_v1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 8a0a5e5d049f..1833d0ce7afe 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -666,6 +666,7 @@ static int mtk_iommu_v1_probe(struct platform_device
*pdev)
}
if (!plarbdev->dev.driver) {
of_node_put(larbnode);
+ put_device(&plarbdev->dev);
return -EPROBE_DEFER;
}
data->larb_imu[i].dev = &plarbdev->dev;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-18 8:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230718082500.17066-1-xujianghui@cdjrlc.com>
2023-07-18 8:28 ` [PATCH] iommu/mtk_iommu_v1: add missing put_device() sunran001
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®