mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
sandbox: Correct error handling in state_read_file()
This function should return a useful error for U-Boot, rather than -1. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
5519912164
commit
d73125cb8e
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ static int state_read_file(struct sandbox_state *state, const char *fname)
|
|||
ret = os_get_filesize(fname, &size);
|
||||
if (ret < 0) {
|
||||
printf("Cannot find sandbox state file '%s'\n", fname);
|
||||
return ret;
|
||||
return -ENOENT;
|
||||
}
|
||||
state->state_fdt = os_malloc(size);
|
||||
if (!state->state_fdt) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue