diff options
| author | Alvin Chang <[email protected]> | 2025-04-30 17:10:07 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-05-20 11:20:57 +0530 |
| commit | 2bb76326496440996b44bf20f3ceab127c7f72ae (patch) | |
| tree | 971fad8de5be68a80486e16d033254a44eab2f7c /platform | |
| parent | f3cce5b97f15f5ca87409902ca6a856b5012a5b3 (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 'platform')
| -rw-r--r-- | platform/generic/platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/generic/platform.c b/platform/generic/platform.c index 2e856642..47e771ad 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -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 = { |
