summaryrefslogtreecommitdiff
path: root/drivers/interconnect/core.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-11-19 13:37:46 +0300
committerGeorgi Djakov <georgi.djakov@linaro.org>2020-11-20 17:01:35 +0300
commit017496af28e2589c2c2cb396baba0507179d2748 (patch)
tree58493fb521a8c9d1edc213d78b8d1c4930361c52 /drivers/interconnect/core.c
parent7ab1e9117607485df977bb6e271be5c5ad649a4c (diff)
downloadlinux-017496af28e2589c2c2cb396baba0507179d2748.tar.xz
interconnect: fix memory trashing in of_count_icc_providers()
of_count_icc_providers() function uses for_each_available_child_of_node() helper to recursively check all the available nodes. This helper already properly handles child nodes' reference count, so there is no need to do it explicitly. Remove the excessive call to of_node_put(). This fixes memory trashing when CONFIG_OF_DYNAMIC is enabled (for example arm/multi_v7_defconfig). Fixes: b1d681d8d324 ("interconnect: Add sync state support") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20201119103746.32564-1-m.szyprowski@samsung.com Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect/core.c')
-rw-r--r--drivers/interconnect/core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 974a66725d09..5ad519c9f239 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -1083,7 +1083,6 @@ static int of_count_icc_providers(struct device_node *np)
count++;
count += of_count_icc_providers(child);
}
- of_node_put(np);
return count;
}