提交 4bfab5bf 编写于 作者: M Masahiro Yamada 提交者: Xie XiuQi

kconfig: fix return value of do_error_if()

stable inclusion
from stable-5.10.4
commit 87c0d2ab8a8e0bf7bf5d0abf0d695aeab6a8af3b
bugzilla: 46903

--------------------------------

[ Upstream commit 135b4957 ]

$(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: 1d6272e6 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions")
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 302e86fe
......@@ -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[])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册