of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen <peter.c...@nxp.com>
---
 drivers/memory/emif.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 04644e7..c5ec77d 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1409,8 +1409,10 @@ static struct emif_data * __init_or_module 
of_get_memory_device_details(
        goto out;
 
 error:
+       of_put_node(np_ddr);
        return NULL;
 out:
+       of_put_node(np_ddr);
        return emif;
 }
 
-- 
1.9.1

Reply via email to