From 00c7c81f7b49d9b739690c45d9986474d52c6240 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 19 Oct 2016 11:30:34 +0100 Subject: iommu/mediatek: Convert DT component matching to component_match_add_release() Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King Signed-off-by: Joerg Roedel --- drivers/iommu/mtk_iommu_v1.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/iommu/mtk_iommu_v1.c') diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 884c80cb795e..af70040038e9 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -601,17 +601,19 @@ static int mtk_iommu_probe(struct platform_device *pdev) continue; plarbdev = of_find_device_by_node(larb_spec.np); - of_node_put(larb_spec.np); if (!plarbdev) { plarbdev = of_platform_device_create( larb_spec.np, NULL, platform_bus_type.dev_root); - if (!plarbdev) + if (!plarbdev) { + of_node_put(larb_spec.np); return -EPROBE_DEFER; + } } data->smi_imu.larb_imu[larb_nr].dev = &plarbdev->dev; - component_match_add(dev, &match, compare_of, larb_spec.np); + component_match_add_release(dev, &match, release_of, + compare_of, larb_spec.np); larb_nr++; } -- cgit v1.2.3