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: v4.19.164~97 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0caa39f2c9d94cc1c0a5ff0940cb747651ba451c;p=users%2Fdwmw2%2Flinux.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 5ca2df790d3cf..389814b02d06b 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -111,7 +111,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[])