iommu/mtk_iommu_v1: add missing put_device()
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 iommu/mtk_iommu_v1: add missing put_device()
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 <[email protected]>
--- drivers/iommu/mtk_iommu_v1.c | 1 + 1 file changed, 1 insertion(+)
drivers/iommu/mtk_iommu_v1.c +1 -0
@@ -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;