浏览代码

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 <sjg@chromium.org>
Simon Glass 3 年之前
父节点
当前提交
a8d696275a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      common/bootm.c

+ 2 - 1
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);