From: Anup Patel Date: Wed, 27 Jan 2016 05:21:16 +0000 (+0530) Subject: of: iommu: Increment DT node refcount in of_iommu_set_ops() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b;p=linux-beck.git of: iommu: Increment DT node refcount in of_iommu_set_ops() We are saving pointer to iommu DT node in of_iommu_set_ops() hence we should increment DT node ref count. Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Robin Murphy Signed-off-by: Anup Patel Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 60ba238090d9..5fea665af99d 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;