From: Peter Chen <peter.chen@nxp.com>
Date: Thu, 25 Aug 2016 21:19:04 +0000 (-0600)
Subject: hwtracing: coresight: of_coresight: add missing of_node_put after calling of_parse_ph... 
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f73b0b9faa11446f73dba02811f928a230773c5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

hwtracing: coresight: of_coresight: add missing of_node_put after calling of_parse_phandle

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

Cc: linux-arm-kernel@lists.infradead.org
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index 18f1c8c4776b..629e031b7456 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -184,6 +184,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
 			break;
 		}
 	}
+	of_node_put(dn);
 
 	return pdata;
 }