diff mbox

[2/2] hwtracing: coresight: of_coresight: add missing of_node_put after calling of_parse_phandle

Message ID 1467684664-21155-2-git-send-email-peter.chen@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Chen July 5, 2016, 2:11 a.m. UTC
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>
---
 drivers/hwtracing/coresight/of_coresight.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mathieu Poirier July 5, 2016, 4:44 p.m. UTC | #1
On 4 July 2016 at 20:11, Peter Chen <peter.chen@nxp.com> wrote:
> 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>
> ---
>  drivers/hwtracing/coresight/of_coresight.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
> index b68da18..b693a4b 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;
>  }
> --
> 1.9.1
>

Applied - thanks.
Mathieu
diff mbox

Patch

diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index b68da18..b693a4b 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;
 }