powerpc/kexec: Fix return of uninitialized variable
authorZhang Zekun <zhangzekun11@huawei.com>
Mon, 30 Sep 2024 07:56:28 +0000 (15:56 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 14 Nov 2024 13:29:46 +0000 (00:29 +1100)
commit83b5a407fbb73e6965adfb4bd0a803724bf87f96
tree43a665e4ae2212686bcc99541c81eed824da708f
parent352268dc6da7b422022541c2cf846663110f775c
powerpc/kexec: Fix return of uninitialized variable

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
arch/powerpc/kexec/file_load_64.c