]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: samsung: drop pin banks references on error paths
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Tue, 11 Jan 2022 20:13:59 +0000 (21:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:09 +0000 (09:08 +0200)
commite4bc03a96374556962a3ba560ca5c9f8c99a72c9
tree850adcae3d63996a0ed91a3ee0baa492b753bfba
parent438068f4912183a59fcb6b7496a06437f7fd4e2b
pinctrl: samsung: drop pin banks references on error paths

commit 50ebd19e3585b9792e994cfa8cbee8947fe06371 upstream.

The driver iterates over its devicetree children with
for_each_child_of_node() and stores for later found node pointer.  This
has to be put in error paths to avoid leak during re-probing.

Fixes: ab663789d697 ("pinctrl: samsung: Match pin banks with their device nodes")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20220111201426.326777-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/samsung/pinctrl-samsung.c