projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5519912
)
sandbox: Correct error handling in state_read_file()
author
Simon Glass
<sjg@chromium.org>
Mon, 4 May 2015 17:31:07 +0000
(11:31 -0600)
committer
Simon Glass
<sjg@chromium.org>
Fri, 15 May 2015 00:49:34 +0000
(18:49 -0600)
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>
arch/sandbox/cpu/state.c
patch
|
blob
|
history
diff --git
a/arch/sandbox/cpu/state.c
b/arch/sandbox/cpu/state.c
index 033958ce74235b26ecf374a69c83b11175c7b56c..cae731c8f16ede3e01b193fad1c438fced894121 100644
(file)
--- 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) {