]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kexec: fix return code handling
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Nov 2021 10:06:38 +0000 (11:06 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 18 Nov 2021 16:25:35 +0000 (17:25 +0100)
commitc2ba051a20b8cb68ee43293b5eeb7d96b0332f3c
tree58c3e6c2e4cd4b129c446e7465fe38eef30c9df9
parent1029155df57180520a88055ce6dc909e1876fa68
s390/kexec: fix return code handling

kexec_file_add_ipl_report ignores that ipl_report_finish may fail and
can return an error pointer instead of a valid pointer.
Fix this and simplify by returning NULL in case of an error and let
the only caller handle this case.

Fixes: 1102f4a31bc5 ("s390/kexec_file: Create ipl report and pass to next kernel")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/ipl.c
arch/s390/kernel/machine_kexec_file.c