]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/kexec: Fix return of uninitialized variable
authorZhang Zekun <zhangzekun11@huawei.com>
Mon, 30 Sep 2024 07:56:28 +0000 (15:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:03 +0000 (19:51 +0100)
commit7f5355199d21cff41d405ebc5d4e3cf7793dc52a
treeb99747524469a0fbf977e466b93259d517921b54
parent17248fdbe3ca48b3d5ee289957ceece1660d5e28
powerpc/kexec: Fix return of uninitialized variable

[ Upstream commit 83b5a407fbb73e6965adfb4bd0a803724bf87f96 ]

of_property_read_u64() can fail and leave the variable uninitialized,
which will then be used. Return error if reading the property failed.

Fixes: 2e6bd221d96f ("powerpc/kexec_file: Enable early kernel OPAL calls")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20240930075628.125138-1-zhangzekun11@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kexec/file_load_64.c