powerpc/powernv: add missing of_node_put() in opal_export_attrs()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Tue, 6 Sep 2022 14:17:03 +0000 (14:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:22 +0000 (12:35 +0200)
commit61af84b3db8183bfa6faeb42adc7865c597dbcd9
tree1bae7bbffe688c5c747647966d0b7cd1d883c773
parent5be9cb6c06fa1a6fa6ae45f2fa61f7e4c10794b9
powerpc/powernv: add missing of_node_put() in opal_export_attrs()

[ Upstream commit 71a92e99c47900cc164620948b3863382cec4f1a ]

After using 'np' returned by of_find_node_by_path(), of_node_put()
need be called to decrease the refcount.

Fixes: 11fe909d2362 ("powerpc/powernv: Add OPAL exports attributes to sysfs")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220906141703.118192-1-zhengyongjun3@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/opal.c