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 <alvinga@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250430091007.3768180-1-alvinga@andestech.com
Signed-off-by: Anup Patel <anup@brainfault.org>
这个提交包含在:
Alvin Chang
2025-05-20 11:20:57 +05:30
提交者 Anup Patel
父节点 f3cce5b97f
当前提交 2bb7632649
修改 3 个文件,包含 5 行新增10 行删除
+2 -2
查看文件
@@ -15,11 +15,11 @@
#ifdef CONFIG_FDT_MPXY
void fdt_mpxy_init(const void *fdt);
int fdt_mpxy_init(const void *fdt);
#else
static inline void fdt_mpxy_init(const void *fdt) { }
static inline int fdt_mpxy_init(const void *fdt) { return 0; }
#endif