diff options
author | Anup Patel <anup.patel@broadcom.com> | 2016-01-27 00:21:16 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-02-18 10:02:43 -0500 |
commit | 45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b (patch) | |
tree | e31a2c33555a0c15677becfa98b8a68b38583739 | |
parent | 9adb95949a343dac53b1cd81dc973b5f815c88d4 (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>
-rw-r--r-- | drivers/iommu/of_iommu.c | 1 |
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) | |||
110 | if (WARN_ON(!iommu)) | 110 | if (WARN_ON(!iommu)) |
111 | return; | 111 | return; |
112 | 112 | ||
113 | of_node_get(np); | ||
113 | INIT_LIST_HEAD(&iommu->list); | 114 | INIT_LIST_HEAD(&iommu->list); |
114 | iommu->np = np; | 115 | iommu->np = np; |
115 | iommu->ops = ops; | 116 | iommu->ops = ops; |