summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorAlvin Chang <[email protected]>2025-04-30 17:10:07 +0800
committerAnup Patel <[email protected]>2025-05-20 11:20:57 +0530
commit2bb76326496440996b44bf20f3ceab127c7f72ae (patch)
tree971fad8de5be68a80486e16d033254a44eab2f7c /lib/utils
parentf3cce5b97f15f5ca87409902ca6a856b5012a5b3 (diff)
lib: utils: Fix fdt_mpxy_init() not returning error code
It seems that current implementation doesn't fail on fdt_mpxy_init(), because platforms might not have any MPXY devices. In fact, if there are no MPXY devices, fdt_driver_init_all() will return SBI_OK. More importantly, if there is any MPXY device which fails the initialization, OpenSBI must check the error code and stop the booting. Thus, this commit adds the return value for fdt_mpxy_init(). Signed-off-by: Alvin Chang <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/mpxy/fdt_mpxy.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/utils/mpxy/fdt_mpxy.c b/lib/utils/mpxy/fdt_mpxy.c
index 6984ec74..e6e26145 100644
--- a/lib/utils/mpxy/fdt_mpxy.c
+++ b/lib/utils/mpxy/fdt_mpxy.c
@@ -12,11 +12,7 @@
/* List of FDT MPXY drivers generated at compile time */
extern const struct fdt_driver *const fdt_mpxy_drivers[];
-void fdt_mpxy_init(const void *fdt)
+int fdt_mpxy_init(const void *fdt)
{
- /*
- * Platforms might have multiple MPXY devices or might not
- * have any MPXY devices so don't fail.
- */
- fdt_driver_init_all(fdt, fdt_mpxy_drivers);
+ return fdt_driver_init_all(fdt, fdt_mpxy_drivers);
}