summaryrefslogtreecommitdiff
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-12-20 03:18:42 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:51:29 +0100
commitcbcb176b6016ff96d3aabc37d35647df5023b699 (patch)
treeb8333ec100b2b3f66483278976fbf6df0dbf6d2e /scripts/kconfig
parent6e8beb020d5c40651fafd5c8073dea120291dfb5 (diff)
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/kconfig')
-rw-r--r--scripts/kconfig/preprocess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c
index 0243086fb168..0590f86df6e4 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[])