aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-06-23 14:30:33 -0600
committerTom Rini <trini@konsulko.com>2024-07-04 09:25:21 -0600
commit4a8a54c3f4202482ec4f24a117afc38cf2c0c051 (patch)
treeb69fd2a2ee983403d9ea52b928632dbac3eaff03 /lib
parentf840a5b34ca181c4ecd8ee5c60a0a1bf5f8e559c (diff)
downloadu-boot-4a8a54c3f4202482ec4f24a117afc38cf2c0c051.zip
u-boot-4a8a54c3f4202482ec4f24a117afc38cf2c0c051.tar.gz
u-boot-4a8a54c3f4202482ec4f24a117afc38cf2c0c051.tar.bz2
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 <sjg@chromium.org> Fixes: a5a57562856 ("lib: smbios: Detect system properties via...")
Diffstat (limited to 'lib')
-rw-r--r--lib/smbios.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/smbios.c b/lib/smbios.c
index fb6eaf1..4126466 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 <dm.h>
#include <env.h>
#include <linux/stringify.h>
@@ -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;