[PATCH] common: board_r: print error if binman_init fails

Simon Glass sjg at chromium.org
Tue Jul 20 19:42:12 CEST 2021


Hi Tim,

On Fri, 16 Jul 2021 at 16:44, Tim Harvey <tharvey at gateworks.com> wrote:
>
> Display an error if binman_init fails.
>
> Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> ---
>  common/board_r.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index 3f82404772..e3e6248a1f 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -323,10 +323,16 @@ static int initr_manual_reloc_cmdtable(void)
>
>  static int initr_binman(void)
>  {
> +       int ret;
> +
>         if (!CONFIG_IS_ENABLED(BINMAN_FDT))
>                 return 0;
>
> -       return binman_init();
> +       ret = binman_init();
> +       if (ret)
> +               printf("binman_init failed:%d\n", ret);

How about log_err() instead of printf() ?

> +
> +       return ret;
>  }
>
>  #if defined(CONFIG_MTD_NOR_FLASH)
> --
> 2.17.1
>

Regards,
Simon


More information about the U-Boot mailing list