mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
gpio: sifive: Fix refcount leak in sifive_gpio_probe
[ Upstream commit694175cd8a] 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:96868dce64("gpio/sifive: Add GPIO driver for SiFive SoCs") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ec369e215
commit
f4a2ad1002
@@ -195,6 +195,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
parent = irq_find_host(irq_parent);
|
parent = irq_find_host(irq_parent);
|
||||||
|
of_node_put(irq_parent);
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
dev_err(dev, "no IRQ parent domain\n");
|
dev_err(dev, "no IRQ parent domain\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|||||||
Reference in New Issue
Block a user