mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 14:14:24 +08:00
of/irq: add missing of_node_put() for interrupt parent node
After calling of_irq_parse_one(), the node provided in the of_phandle_args has a refcount increment by one. Add missing of_node_put in of_irq_get() to decrement the refcount once used. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Link: https://lore.kernel.org/r/20230117144929.423089-1-clement.leger@bootlin.com Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
7e38085d9c
commit
eb2b4ecf72
@ -438,10 +438,16 @@ int of_irq_get(struct device_node *dev, int index)
|
||||
return rc;
|
||||
|
||||
domain = irq_find_host(oirq.np);
|
||||
if (!domain)
|
||||
return -EPROBE_DEFER;
|
||||
if (!domain) {
|
||||
rc = -EPROBE_DEFER;
|
||||
goto out;
|
||||
}
|
||||
|
||||
return irq_create_of_mapping(&oirq);
|
||||
rc = irq_create_of_mapping(&oirq);
|
||||
out:
|
||||
of_node_put(oirq.np);
|
||||
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_irq_get);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user