]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: renesas: rzv2m: Fix missing of_node_put() call
authorFabrizio Castro <fabrizio.castro.jz@renesas.com>
Wed, 5 Mar 2025 16:37:52 +0000 (16:37 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Mar 2025 15:41:43 +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: 92a9b8252576 ("pinctrl: renesas: Add RZ/V2M pin and gpio controller driver")
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-4-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzv2m.c

index 4062c56619f595017091e6682689bfdf9ad4964f..8c7169db4fcce6144d26b963dfd3b11bacd66d80 100644 (file)
@@ -940,6 +940,8 @@ static int rzv2m_gpio_register(struct rzv2m_pinctrl *pctrl)
                return ret;
        }
 
+       of_node_put(of_args.np);
+
        if (of_args.args[0] != 0 || of_args.args[1] != 0 ||
            of_args.args[2] != pctrl->data->n_port_pins) {
                dev_err(pctrl->dev, "gpio-ranges does not match selected SOC\n");