From: Simon Glass Date: Mon, 15 Mar 2021 05:11:23 +0000 (+1300) Subject: bootm: Skip command-line substitution if !CONFIG_CMDLINE X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=a8d696275aca9a121d438db50fcc44c02d7793cb;p=u-boot.git bootm: Skip command-line substitution if !CONFIG_CMDLINE When there is no command line, we cannot enable this feature. Add a check to avoid a build error. Signed-off-by: Simon Glass --- diff --git a/common/bootm.c b/common/bootm.c index dab7c3619f..ea71522d0c 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -583,7 +583,8 @@ int bootm_process_cmdline(char *buf, int maxlen, int flags) if (ret) return log_msg_ret("silent", ret); } - if (IS_ENABLED(CONFIG_BOOTARGS_SUBST) && (flags & BOOTM_CL_SUBST)) { + if (IS_ENABLED(CONFIG_BOOTARGS_SUBST) && IS_ENABLED(CONFIG_CMDLINE) && + (flags & BOOTM_CL_SUBST)) { ret = process_subst(buf, maxlen); if (ret) return log_msg_ret("subst", ret);