]> git.baikalelectronics.ru Git - kernel.git/commit
interconnect: fix memory trashing in of_count_icc_providers()
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 19 Nov 2020 10:37:46 +0000 (11:37 +0100)
committerGeorgi Djakov <georgi.djakov@linaro.org>
Fri, 20 Nov 2020 14:01:35 +0000 (16:01 +0200)
commitfdb9634a4a490dc4365cb4a37d7f2d5bdc507b99
tree58493fb521a8c9d1edc213d78b8d1c4930361c52
parentaddcf17fd54bf2d54775552014f87fb56f863edc
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: 787feda3caad ("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>
drivers/interconnect/core.c