Hi Simon,

On Sat, 18 Nov 2023 at 23:06, Simon Glass <s...@chromium.org> wrote:
>
> Move the argument decoding to the caller, to avoid needing to pass the
> command-line arguments.
>
> Add a function comment while we are here.
>
> Signed-off-by: Simon Glass <s...@chromium.org>
> Reviewed-by: Tom Rini <tr...@konsulko.com>
> ---
>
> (no changes since v1)

[...]

>
>         if (IS_ENABLED(CONFIG_CMD_BOOTM_PRE_LOAD))
> @@ -785,7 +794,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int 
> argc,
>                 ret = bootm_start();
>
>         if (!ret && (states & BOOTM_STATE_PRE_LOAD))
> -               ret = bootm_pre_load(cmdtp, flag, argc, argv);
> +               ret = bootm_pre_load(argv[0]);

Is there a check for the validity of argv[0] before this call?

Thanks
/Ilias
>
>         if (!ret && (states & BOOTM_STATE_FINDOS))
>                 ret = bootm_find_os(cmdtp, flag, argc, argv);
> --
> 2.43.0.rc0.421.g78406f8d94-goog
>

Reply via email to