aboutsummaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorAnup Patel2016-01-27 10:51:16 +0530
committerWill Deacon2016-02-18 15:02:43 +0000
commit45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b (patch)
treee31a2c33555a0c15677becfa98b8a68b38583739 /drivers/iommu
parent9adb95949a343dac53b1cd81dc973b5f815c88d4 (diff)
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 <rjui@broadcom.com> Reviewed-by: Scott Branden <sbranden@broadcom.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Anup Patel <anup.patel@broadcom.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/of_iommu.c1
1 files changed, 1 insertions, 0 deletions
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;