[PATCH 2/2] board-info: Call sysinfo_detect() before sysinfo_get_str()

Simon Glass sjg at chromium.org
Mon Jul 5 17:29:55 CEST 2021


On Sun, 4 Jul 2021 at 13:32, Marek Vasut <marek.vasut at gmail.com> wrote:
>
> The sysinfo_get_str() implementation checks whether the sysinfo was even
> detected. In U-Boot proper, sysinfo_detect() is not called anywhere but
> on one specific board. Call sysinfo_detect() before sysinfo_get_str() to
> make sure the sysinfo is detected and sysinfo_get_str() returns valid
> value instead of -EPERM.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
> Cc: Marcel Ziswiler <marcel.ziswiler at toradex.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  common/board_info.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

I wonder if we should have sysinfo_get_detect() ?


More information about the U-Boot mailing list