Commit 45bb966d authored by Anup Patel's avatar Anup Patel Committed by Will Deacon

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: default avatarRay Jui <rjui@broadcom.com>
Reviewed-by: default avatarScott Branden <sbranden@broadcom.com>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarAnup Patel <anup.patel@broadcom.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 9adb9594
...@@ -110,6 +110,7 @@ void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops) ...@@ -110,6 +110,7 @@ void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops)
if (WARN_ON(!iommu)) if (WARN_ON(!iommu))
return; return;
of_node_get(np);
INIT_LIST_HEAD(&iommu->list); INIT_LIST_HEAD(&iommu->list);
iommu->np = np; iommu->np = np;
iommu->ops = ops; iommu->ops = ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment