pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init
commit7b703ca18b92dd44419727f932d32d5d6f0dff2c
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 5 Aug 2019 16:27:08 +0000 (5 18:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 18:56:38 +0000 (17 19:56 +0100)
treed2114ab3b91a20cd472ef31dfeddabfb8a1dc482
parentd3d3a0bc3228056b00af2955b9273aa3c5eb264a
pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init

commit 6fbbcb050802d6ea109f387e961b1dbcc3a80c96 upstream.

In s3c24xx_eint_init() the for_each_child_of_node() loop is used 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: af99a7507469 ("pinctrl: Add pinctrl-s3c24xx driver")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/samsung/pinctrl-s3c24xx.c