diff options
author | Simon Glass <sjg@chromium.org> | 2015-05-04 11:31:07 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-14 18:49:34 -0600 |
commit | d73125cb8e2e43e6476642206e0fec7c83b486c9 (patch) | |
tree | 9aa19ddf8336d7b9c122469c93b26146a4b6ac99 /arch/sandbox | |
parent | 5519912164698b634893913b4408fee736d01d06 (diff) | |
download | talos-obmc-uboot-d73125cb8e2e43e6476642206e0fec7c83b486c9.tar.gz talos-obmc-uboot-d73125cb8e2e43e6476642206e0fec7c83b486c9.zip |
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>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 033958ce74..cae731c8f1 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -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) { |