OSDN Git Service

mips: cdmm: Fix refcount leak in mips_cdmm_phys_base
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 9 Mar 2022 09:17:10 +0000 (09:17 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 14 Mar 2022 14:01:51 +0000 (15:01 +0100)
commit4528668ca331f7ce5999b7746657b46db5b3b785
tree3284d151257ae1567dacdd58f98860531f240c46
parent3f059a7e8c13c62addc1808d13a41d1f6dc24bd1
mips: cdmm: Fix refcount leak in mips_cdmm_phys_base

The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.

Fixes: 2121aa3e2312 ("mips: cdmm: Add mti,mips-cdmm dtb node support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
drivers/bus/mips_cdmm.c