提交 45bb966d 编写于 作者: A Anup Patel 提交者: 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: NRay Jui <rjui@broadcom.com>
Reviewed-by: NScott Branden <sbranden@broadcom.com>
Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
Signed-off-by: NAnup Patel <anup.patel@broadcom.com>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 9adb9594
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册