]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pinctrl: renesas: rza2: Fix missing of_node_put() call
authorFabrizio Castro <fabrizio.castro.jz@renesas.com>
Wed, 5 Mar 2025 16:37:53 +0000 (16:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:30:57 +0000 (14:30 +0200)
[ Upstream commit abcdeb4e299a11ecb5a3ea0cce00e68e8f540375 ]

of_parse_phandle_with_fixed_args() requires its caller to
call into of_node_put() on the node pointer from the output
structure, but such a call is currently missing.

Call into of_node_put() to rectify that.

Fixes: b59d0e782706 ("pinctrl: Add RZ/A2 pin and gpio controller")
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250305163753.34913-5-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/renesas/pinctrl-rza2.c

index ddd8ee6b604ef26d4900335ad4fe43e2d0f9f587..1fd3191d9f8d969b1edcee31059f220994911ba4 100644 (file)
@@ -253,6 +253,8 @@ static int rza2_gpio_register(struct rza2_pinctrl_priv *priv)
                return ret;
        }
 
+       of_node_put(of_args.np);
+
        if ((of_args.args[0] != 0) ||
            (of_args.args[1] != 0) ||
            (of_args.args[2] != priv->npins)) {