Skip to content

Commit 67c3e59

Browse files
Nicholas Mc Guirempe
authored andcommitted
powerpc/pseries: Fix missing of_node_put() in rng_init()
The call to of_find_compatible_node() returns a node pointer with refcount incremented thus it must be explicitly decremented here before returning. Fixes: a489043 ("powerpc/pseries: Implement arch_get_random_long() based on H_RANDOM") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1530522496-14816-1-git-send-email-hofrat@osadl.org
1 parent d012a71 commit 67c3e59

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • arch/powerpc/platforms/pseries

‎arch/powerpc/platforms/pseries/rng.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static __init int rng_init(void)
3636

3737
ppc_md.get_random_seed = pseries_get_random_long;
3838

39+
of_node_put(dn);
3940
return 0;
4041
}
4142
machine_subsys_initcall(pseries, rng_init);

0 commit comments

Comments
 (0)