From: Simon Glass Date: Sun, 23 Jun 2024 20:30:33 +0000 (-0600) Subject: smbios: Correct error handling when writing tables X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=4a8a54c3f4202482ec4f24a117afc38cf2c0c051;p=u-boot.git smbios: Correct error handling when writing tables Since write_smbios_table() returns an address, we cannot use it to return and error number. Also, failing on sysinfo_detect() breaks existing boards, e.g. chromebook_link Correct this by logging and swallowing the error. Signed-off-by: Simon Glass Fixes: a5a57562856 ("lib: smbios: Detect system properties via...") --- diff --git a/lib/smbios.c b/lib/smbios.c index fb6eaf1d5c..4126466e34 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -5,6 +5,8 @@ * Adapted from coreboot src/arch/x86/smbios.c */ +#define LOG_CATEGORY LOGC_BOARD + #include #include #include @@ -596,8 +598,12 @@ ulong write_smbios_table(ulong addr) parent_node = dev_read_subnode(ctx.dev, "smbios"); ret = sysinfo_detect(ctx.dev); - if (ret) - return ret; + + /* + * ignore the error since many boards don't implement + * this and we can still use the info in the devicetree + */ + ret = log_msg_ret("sys", ret); } } else { ctx.dev = NULL;