Skip to content
Commit cc76404f authored by Wen Yang's avatar Wen Yang Committed by Michael Ellerman
Browse files

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: a8db8cf0 ("irq_domain: Replace irq_alloc_host() with revmap-specific initializers")
Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
Suggested-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Suggested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarPeng Hao <peng.hao2@zte.com.cn>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 7f177f98
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment