diff options
author | Liang He <windhl@126.com> | 2022-07-01 22:49:49 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-05 17:28:26 +1000 |
commit | f4f8320b01677b467c768c43c1e1d10383a0e30d (patch) | |
tree | 2017e157c794d8dc50b72851f03b909b22192e68 /arch/powerpc/platforms/cell | |
parent | ad4b323693abd221798a6479105d22c79605aa0f (diff) |
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: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220701144949.252364-2-windhl@126.com
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/iommu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 0ca3efeef293..8c7133039566 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c @@ -720,8 +720,10 @@ static int __init cell_iommu_init_disabled(void) cell_disable_iommus(); /* 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; + of_node_put(np); /* Now we need to check to see where the memory is mapped * in PCI space. We assume that all busses use the same dma |