diff mbox

iommu/mediatek: Do not call of_node_put in mtk_iommu_of_xlate

Message ID 1465379444-14719-1-git-send-email-honghui.zhang@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Honghui Zhang June 8, 2016, 9:50 a.m. UTC
From: Honghui Zhang <honghui.zhang@mediatek.com>

The device_node will be released in of_iommu_configure, it may be double
released if call of_node_put in mtk_iommu_of_xlate.

Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
---
 drivers/iommu/mtk_iommu.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Joerg Roedel June 21, 2016, 9:39 a.m. UTC | #1
On Wed, Jun 08, 2016 at 05:50:44PM +0800, honghui.zhang@mediatek.com wrote:
> From: Honghui Zhang <honghui.zhang@mediatek.com>
> 
> The device_node will be released in of_iommu_configure, it may be double
> released if call of_node_put in mtk_iommu_of_xlate.
> 
> Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
> ---
>  drivers/iommu/mtk_iommu.c | 1 -
>  1 file changed, 1 deletion(-)

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index c3043d8..493bd3e 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -455,7 +455,6 @@  static int mtk_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
 	if (!dev->archdata.iommu) {
 		/* Get the m4u device */
 		m4updev = of_find_device_by_node(args->np);
-		of_node_put(args->np);
 		if (WARN_ON(!m4updev))
 			return -EINVAL;