kernel_optimize_test/drivers/clk/versatile
Sumera Priyadarsini da9c43dc0e clk: versatile: Add of_node_put() before return statement
Every iteration of for_each_available_child_of_node() decrements
the reference count of the previous node, however when control is
transferred from the middle of the loop, as in the case of a return
or break or goto, there is no decrement thus ultimately resulting in
a memory leak.

Fix a potential memory leak in clk-impd1.c by inserting
of_node_put() before a return statement.

Issue found with Coccinelle.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20200829175704.GA10998@Kaladin
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2020-09-10 00:57:42 -07:00
..
clk-icst.c clk: versatile: Export icst_clk_setup() 2020-03-20 17:55:31 -07:00
clk-icst.h clk: versatile: Add device tree probing for IM-PD1 clocks 2020-03-20 17:55:31 -07:00
clk-impd1.c clk: versatile: Add of_node_put() before return statement 2020-09-10 00:57:42 -07:00
clk-sp810.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
clk-versatile.c clk: versatile: remove redundant assignment to pointer clk 2020-05-26 23:40:41 -07:00
clk-vexpress-osc.c clk: vexpress-osc: Support building as a module 2020-05-13 12:42:45 -05:00
icst.c Replace HTTP links with HTTPS ones: Common CLK framework 2020-07-10 17:15:34 -07:00
icst.h Replace HTTP links with HTTPS ones: Common CLK framework 2020-07-10 17:15:34 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00