Skip to content

Commit c0b4a4f

Browse files
outman119linusw
authored andcommitted
pinctrl: equilibrium: Fix device node reference leak in pinbank_init()
When calling of_parse_phandle_with_fixed_args(), the caller is responsible to call of_node_put() to release the reference of device node. In pinbank_init(), the reference of the node obtained from the "gpio-ranges" property is never released, resulting in a reference count leak. Add the missing of_node_put() call to fix the leak. Fixes: 1948d5c ("pinctrl: Add pinmux & GPIO controller driver for a new SoC") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
1 parent ebd2f48 commit c0b4a4f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/pinctrl/pinctrl-equilibrium.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,7 @@ static int pinbank_init(struct device_node *np,
846846

847847
bank->pin_base = spec.args[1];
848848
bank->nr_pins = spec.args[2];
849+
of_node_put(spec.np);
849850

850851
bank->aval_pinmap = readl(bank->membase + REG_AVAIL);
851852
bank->id = id;

0 commit comments

Comments
 (0)