coresight: of_get_coresight_platform_data: Add missing of_node_put
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 5 Jun 2017 20:15:14 +0000 (14:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:45:24 +0000 (11:45 +0200)
commit04c9490035691a398d851fd160ce8af08ba0af0d
treebd22e56074f1f34707539b06d359e7f25a038ccc
parent2fd95d6565f305bc5c1f0bf9922cbff350117f04
coresight: of_get_coresight_platform_data: Add missing of_node_put

The of_get_coresight_platform_data iterates over the possible CPU nodes
to find a given cpu phandle. However it does not drop the reference
to the node pointer returned by the of_get_coresight_platform_data.

This patch also introduces another minor fix is to use
of_cpu_device_node_get() to replace of_get_cpu_node().

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[Leo: minor tweaks for of_get_coresight_platform_data]
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/of_coresight.c