mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
powerpc/powernv: add missing of_node_put() in opal_export_attrs()
[ Upstream commit71a92e99c4] After using 'np' returned by of_find_node_by_path(), of_node_put() need be called to decrease the refcount. Fixes:11fe909d23("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>
This commit is contained in:
parent
434db6d17b
commit
6315998170
|
|
@ -892,6 +892,7 @@ static void opal_export_attrs(void)
|
||||||
kobj = kobject_create_and_add("exports", opal_kobj);
|
kobj = kobject_create_and_add("exports", opal_kobj);
|
||||||
if (!kobj) {
|
if (!kobj) {
|
||||||
pr_warn("kobject_create_and_add() of exports failed\n");
|
pr_warn("kobject_create_and_add() of exports failed\n");
|
||||||
|
of_node_put(np);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user