1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

cbfs: Return the error code from file_cbfs_init()

We may as well return the error code and use it directly in the command
code. CBFS still uses its own error enum which we may be able to remove,
but leave it for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2020-05-24 17:38:21 -06:00
committed by Bin Meng
parent c685f8bcfc
commit 0e7b6312e7
3 changed files with 19 additions and 13 deletions

View File

@@ -28,8 +28,7 @@ static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc,
return 1;
}
}
file_cbfs_init(end_of_rom);
if (cbfs_get_result() != CBFS_SUCCESS) {
if (file_cbfs_init(end_of_rom)) {
printf("%s.\n", file_cbfs_error());
return 1;
}