mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
powerpc/pseries: Fix missing of_node_put() in rng_init()
[ Upstream commit67c3e59443] The call to of_find_compatible_node() returns a node pointer with refcount incremented thus it must be explicitly decremented here before returning. Fixes:a489043f46("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4f74f179a3
commit
d2575bf272
@@ -36,6 +36,7 @@ static __init int rng_init(void)
|
||||
|
||||
ppc_md.get_random_seed = pseries_get_random_long;
|
||||
|
||||
of_node_put(dn);
|
||||
return 0;
|
||||
}
|
||||
machine_subsys_initcall(pseries, rng_init);
|
||||
|
||||
Reference in New Issue
Block a user