From 2bb76326496440996b44bf20f3ceab127c7f72ae Mon Sep 17 00:00:00 2001 From: Alvin Chang Date: Wed, 30 Apr 2025 17:10:07 +0800 Subject: 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 Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250430091007.3768180-1-alvinga@andestech.com Signed-off-by: Anup Patel --- include/sbi_utils/mpxy/fdt_mpxy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sbi_utils/mpxy/fdt_mpxy.h b/include/sbi_utils/mpxy/fdt_mpxy.h index 2ba9d28f..57e0b242 100644 --- a/include/sbi_utils/mpxy/fdt_mpxy.h +++ b/include/sbi_utils/mpxy/fdt_mpxy.h @@ -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 -- cgit v1.3.1