]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootm: Skip command-line substitution if !CONFIG_CMDLINE
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:11:23 +0000 (18:11 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 02:04:31 +0000 (15:04 +1300)
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>
common/bootm.c

index dab7c3619fdc6a51d86f2d949e755a41e51e3a9e..ea71522d0c9b1832c3c4ba0202b4b93d0364603f 100644 (file)
@@ -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);