diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-12-20 03:18:42 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:26:06 +0100 |
commit | 0caa39f2c9d94cc1c0a5ff0940cb747651ba451c (patch) | |
tree | 5422281ec8ed39820dfd45e1d35ef987de7cc8a8 /scripts | |
parent | adac0d69713deb2900bb886d79d65e61d634088b (diff) | |
download | linux-stable-0caa39f2c9d94cc1c0a5ff0940cb747651ba451c.tar.gz linux-stable-0caa39f2c9d94cc1c0a5ff0940cb747651ba451c.tar.bz2 linux-stable-0caa39f2c9d94cc1c0a5ff0940cb747651ba451c.zip |
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 <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/preprocess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 5ca2df790d3c..389814b02d06 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[]) |