From: Masahiro Yamada Date: Sat, 19 Dec 2020 18:18:42 +0000 (+0900) Subject: kconfig: fix return value of do_error_if() X-Git-Tag: v5.10.7~448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87c0d2ab8a8e0bf7bf5d0abf0d695aeab6a8af3b;p=platform%2Fkernel%2Flinux-rpi.git kconfig: fix return value of do_error_if() [ Upstream commit 135b4957eac43af2aedf8e2a277b9540f33c2558 ] $(error-if,...) is expanded to an empty string. Currently, it relies on eval_clause() returning xstrdup("") when all attempts for expansion fail, but the correct implementation is to make do_error_if() return xstrdup(""). Fixes: 1d6272e6fe43 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions") Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 0243086..0590f86 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -114,7 +114,7 @@ static char *do_error_if(int argc, char *argv[]) if (!strcmp(argv[0], "y")) pperror("%s", argv[1]); - return NULL; + return xstrdup(""); } static char *do_filename(int argc, char *argv[])