powerpc/powernv: Fix refcount leak bug in idle.c
PATCH 1/1 powerpc/powernv: Fix refcount leak bug in idle.c
In pnv_parse_cpuidle_dt(), of_find_node_by_path() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore.
Signed-off-by Liang He <[email protected]>
--- arch/powerpc/platforms/powernv/idle.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/platforms/powernv/idle.c +1 -0
@@ -1419,6 +1419,7 @@ static int __init pnv_parse_cpuidle_dt(void)kfree (temp_u32);kfree (temp_u64);kfree (temp_string); +of_node_put (np);return rc; }
Signature · 1 line
2.25.1