Skip to content
Snippets Groups Projects
Commit d73125cb authored by Simon Glass's avatar Simon Glass
Browse files

sandbox: Correct error handling in state_read_file()


This function should return a useful error for U-Boot, rather than -1.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent 55199121
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment