OpenCloudOS-Kernel/arch/powerpc/platforms/8xx
Wen Yang cc76404fea powerpc/8xx: Fix possible device node reference leak
The call to of_find_compatible_node() returns a node pointer with
refcount incremented thus it must be explicitly decremented after the
last usage.

irq_domain_add_linear() also calls of_node_get() to increase refcount,
so irq_domain() will not be affected when it is released.

Detected by coccinelle.

Fixes: a8db8cf0d8 ("irq_domain: Replace irq_alloc_host() with revmap-specific initializers")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Peng Hao <peng.hao2@zte.com.cn>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-04-20 22:02:35 +10:00
..
Kconfig powerpc/8xx: Remove CPU6 ERRATA Workaround 2018-01-16 23:47:12 +11:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
adder875.c powerpc/8xx: Remove RTC clock on 88x 2018-06-04 00:39:18 +10:00
ep88xc.c powerpc/8xx: Remove RTC clock on 88x 2018-06-04 00:39:18 +10:00
m8xx_setup.c powerpc: 8xx: get cpu node with of_get_cpu_node 2018-09-28 14:25:58 -05:00
machine_check.c powerpc/traps: fix machine check handlers to use pr_cont() 2018-10-19 00:56:17 +11:00
mpc8xx.h powerpc: Make ppc_md.{halt, restart} __noreturn 2016-07-14 21:12:06 +10:00
mpc86xads.h [POWERPC] 8xx: Convert mpc866ads to the new device binding. 2007-12-13 22:45:35 -06:00
mpc86xads_setup.c powerpc: Move 32-bit probe() machine to later in the boot process 2016-07-21 19:06:42 +10:00
mpc885ads.h powerpc/cpm: Remove some cruft code and defines 2009-05-19 00:47:19 -05:00
mpc885ads_setup.c powerpc/8xx: Remove RTC clock on 88x 2018-06-04 00:39:18 +10:00
pic.c powerpc/8xx: Fix possible device node reference leak 2019-04-20 22:02:35 +10:00
pic.h powerpc/8xx: Move mpc8xx_pic.c from sysdev to platform/8xx 2017-08-10 23:32:07 +10:00
tqm8xx_setup.c powerpc: Move 32-bit probe() machine to later in the boot process 2016-07-21 19:06:42 +10:00