Commit f4f8320b authored by Liang He's avatar Liang He Committed by Michael Ellerman

powerpc/cell: Add missing of_node_put() in iommu.c

In cell_iommu_init_disabled(), hold the reference returned by
of_find_node_by_name() and use it to call of_node_put() for reference
balance.
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220701144949.252364-2-windhl@126.com
parent ad4b3236
...@@ -720,8 +720,10 @@ static int __init cell_iommu_init_disabled(void) ...@@ -720,8 +720,10 @@ static int __init cell_iommu_init_disabled(void)
cell_disable_iommus(); cell_disable_iommus();
/* If we have no Axon, we set up the spider DMA magic offset */ /* If we have no Axon, we set up the spider DMA magic offset */
if (of_find_node_by_name(NULL, "axon") == NULL) np = of_find_node_by_name(NULL, "axon");
if (!np)
cell_dma_nommu_offset = SPIDER_DMA_OFFSET; cell_dma_nommu_offset = SPIDER_DMA_OFFSET;
of_node_put(np);
/* Now we need to check to see where the memory is mapped /* Now we need to check to see where the memory is mapped
* in PCI space. We assume that all busses use the same dma * in PCI space. We assume that all busses use the same dma
......
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