Commit 67c3e594 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Michael Ellerman

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: a489043f ("powerpc/pseries: Implement arch_get_random_long() based on H_RANDOM")
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1530522496-14816-1-git-send-email-hofrat@osadl.org
parent d012a719
...@@ -36,6 +36,7 @@ static __init int rng_init(void) ...@@ -36,6 +36,7 @@ static __init int rng_init(void)
ppc_md.get_random_seed = pseries_get_random_long; ppc_md.get_random_seed = pseries_get_random_long;
of_node_put(dn);
return 0; return 0;
} }
machine_subsys_initcall(pseries, rng_init); machine_subsys_initcall(pseries, rng_init);
Markdown is supported
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