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)
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Sun, 23 Jan 2022 11:21:56 +0000 (12:21 +0100)
commit50ebd19e3585b9792e994cfa8cbee8947fe06371
treeb4eed7d4dc440ba48ccec1587ef5b5c405b8c0d4
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
pinctrl: samsung: drop pin banks references on error paths

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
drivers/pinctrl/samsung/pinctrl-samsung.c