]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/pseries: Fix missing of_node_put() in rng_init()
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 2 Jul 2018 09:08:16 +0000 (11:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:55:16 +0000 (09:55 +0100)
commit479d8cae79cd295fb126ad7ecda19d9d1f4a849d
treefe0f60efe84ac667f8157899ef5a20d9cee5d31a
parent23679f7acfdb49f7c2947b608de6a10b7eadb6d3
powerpc/pseries: Fix missing of_node_put() in rng_init()

[ Upstream commit 67c3e59443f5fc77be39e2ce0db75fbfa78c7965 ]

The call to of_find_compatible_node() returns a node pointer with
refcount incremented thus it must be explicitly decremented here
before returning.

Fixes: a489043f4626 ("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>
arch/powerpc/platforms/pseries/rng.c