From 9dcf363f509a1fa12a4d0d790a309a77c50aacaa Mon Sep 17 00:00:00 2001 From: Bhupesh Sharma Date: Mon, 17 Dec 2018 00:46:53 +0530 Subject: kexec/kexec-arm64.c: Add error handling check against return value of 'set_bootargs()' This patch adds missing error handling check against the return value of 'set_bootargs()' in 'kexec-arm64.c' Signed-off-by: Bhupesh Sharma Signed-off-by: Simon Horman --- kexec/arch/arm64/kexec-arm64.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c index b143e86..f4913b2 100644 --- a/kexec/arch/arm64/kexec-arm64.c +++ b/kexec/arch/arm64/kexec-arm64.c @@ -413,6 +413,11 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) } result = set_bootargs(dtb, command_line); + if (result) { + fprintf(stderr, "kexec: cannot set bootargs.\n"); + result = -EINVAL; + goto on_error; + } /* determine #address-cells and #size-cells */ result = get_cells_size(dtb->buf, &address_cells, &size_cells); -- cgit