Skip to content

Commit 694175c

Browse files
YuuoniyBartosz Golaszewski
authored andcommitted
gpio: sifive: Fix refcount leak in sifive_gpio_probe
of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 96868dc ("gpio/sifive: Add GPIO driver for SiFive SoCs") Signed-off-by: Miaoqian Lin <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 9883ddf commit 694175c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpio/gpio-sifive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
215215
return -ENODEV;
216216
}
217217
parent = irq_find_host(irq_parent);
218+
of_node_put(irq_parent);
218219
if (!parent) {
219220
dev_err(dev, "no IRQ parent domain\n");
220221
return -ENODEV;

0 commit comments

Comments
 (0)