Skip to content

Commit 95da188

Browse files
Yuuoniygregkh
authored andcommitted
gpio: sifive: Fix refcount leak in sifive_gpio_probe
[ Upstream commit 694175c ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent da9c988 commit 95da188

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
@@ -209,6 +209,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
209209
return -ENODEV;
210210
}
211211
parent = irq_find_host(irq_parent);
212+
of_node_put(irq_parent);
212213
if (!parent) {
213214
dev_err(dev, "no IRQ parent domain\n");
214215
return -ENODEV;

0 commit comments

Comments
 (0)