forked from Mirrors/opensbi
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>
This commit is contained in:
@@ -324,8 +324,7 @@ int generic_mpxy_init(void)
|
||||
{
|
||||
const void *fdt = fdt_get_address();
|
||||
|
||||
fdt_mpxy_init(fdt);
|
||||
return 0;
|
||||
return fdt_mpxy_init(fdt);
|
||||
}
|
||||
|
||||
struct sbi_platform_operations generic_platform_ops = {
|
||||
|
Reference in New Issue
Block a user