]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Mar 2025 15:41:46 +0000 (16:41 +0100)
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>
drivers/pinctrl/renesas/pinctrl-rza2.c

index a654ede01f705f991612c39ea8a668576797898b..3b58129638500eef61058e43e49e6f39fde3cb4e 100644 (file)
@@ -259,6 +259,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)) {