diff options
author | Anup Patel <anup.patel@broadcom.com> | 2016-01-27 06:21:16 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-02-18 16:02:43 +0100 |
commit | 45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b (patch) | |
tree | e31a2c33555a0c15677becfa98b8a68b38583739 /drivers/iommu/of_iommu.c | |
parent | iommu/arm-smmu: Support DMA-API domains (diff) | |
download | linux-45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b.tar.xz linux-45bb966d3dc7c6d4f0bd7673b5fe51deebcaf70b.zip |
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/of_iommu.c')
-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) if (WARN_ON(!iommu)) return; + of_node_get(np); INIT_LIST_HEAD(&iommu->list); iommu->np = np; iommu->ops = ops; |