pinctrl: samsung: Fix device node refcount leaks in init code
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 5 Aug 2019 16:27:10 +0000 (18:27 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Tue, 1 Oct 2019 18:22:04 +0000 (20:22 +0200)
commita322b3377f4bac32aa25fb1acb9e7afbbbbd0137
tree1489eb80b91f2b0f672e6e924d34271216de2ab2
parent7f028caadf6c37580d0f59c6c094ed09afc04062
pinctrl: samsung: Fix device node refcount leaks in init code

Several functions use for_each_child_of_node() loop with a break to find
a matching child node.  Although each iteration of
for_each_child_of_node puts the previous node, but early exit from loop
misses it.  This leads to leak of device node.

Cc: <stable@vger.kernel.org>
Fixes: 9a2c1c3b91aa ("pinctrl: samsung: Allow grouping multiple pinmux/pinconf nodes")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/pinctrl/samsung/pinctrl-samsung.c