From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbcBHFZ5 (ORCPT ); Mon, 8 Feb 2016 00:25:57 -0500 Received: from 5520-maca-inet1-outside.broadcom.com ([216.31.211.11]:9655 "EHLO mail-irv-18.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751084AbcBHFZu (ORCPT ); Mon, 8 Feb 2016 00:25:50 -0500 From: Anup Patel To: Catalin Marinas , Joerg Roedel , Will Deacon , Robin Murphy , Sricharan R , Linux IOMMU , Linux ARM Kernel Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Device Tree , Ray Jui , Scott Branden , Vikram Prakash , Linux Kernel , BCM Kernel Feedback , Anup Patel Subject: [PATCH v2 3/4] of: iommu: Increment DT node refcount in of_iommu_set_ops() Date: Mon, 8 Feb 2016 10:47:31 +0530 Message-Id: <1454908652-15317-4-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454908652-15317-1-git-send-email-anup.patel@broadcom.com> References: <1454908652-15317-1-git-send-email-anup.patel@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are saving pointer to iommu DT node in of_iommu_set_ops() hence we should increment DT node ref count. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Robin Murphy --- drivers/iommu/of_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 60ba238..5fea665 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -110,6 +110,7 @@ void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops) if (WARN_ON(!iommu)) return; + of_node_get(np); INIT_LIST_HEAD(&iommu->list); iommu->np = np; iommu->ops = ops; -- 1.9.1