aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2018-09-20 13:17:38 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-25 20:09:17 +0200
commita0f9992c809fb73a05de1894734418a88178539f (patch)
tree7a2917122be805b562de9fa11cabe8f2fea71c38 /drivers/hwtracing/coresight
parentcoresight: platform: Refactor graph endpoint parsing (diff)
downloadlinux-dev-a0f9992c809fb73a05de1894734418a88178539f.tar.xz
linux-dev-a0f9992c809fb73a05de1894734418a88178539f.zip
coresight: platform: Fix refcounting for graph nodes
The coresight driver doesn't drop the references on the remote endpoint/port nodes. Add the missing of_node_put() calls. Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight')
-rw-r--r--drivers/hwtracing/coresight/of_coresight.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index 70205f3eae8e..28d3aef1660b 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -168,6 +168,11 @@ static int of_coresight_parse_endpoint(struct device *dev,
ret = 1;
} while (0);
+ if (rparent)
+ of_node_put(rparent);
+ if (rport)
+ of_node_put(rport);
+
return ret;
}