Skip to content
Commit a5bea04f authored by Evan Nimmo's avatar Evan Nimmo Committed by Rob Herring
Browse files

of/address: Fix of_node memory leak in of_dma_is_coherent



Commit dabf6b36 ("of: Add OF_DMA_DEFAULT_COHERENT & select it on
powerpc") added a check to of_dma_is_coherent which returns early
if OF_DMA_DEFAULT_COHERENT is enabled. This results in the of_node_put()
being skipped causing a memory leak. Moved the of_node_get() below this
check so we now we only get the node if OF_DMA_DEFAULT_COHERENT is not
enabled.

Fixes: dabf6b36 ("of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc")
Signed-off-by: default avatarEvan Nimmo <evan.nimmo@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20201110022825.30895-1-evan.nimmo@alliedtelesis.co.nz


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent f8394f23
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