bootstage: Tidy up error return values

We should return a proper error number instead of just -1. This helps the
caller to determine what when wrong. Update a few functions to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2017-05-22 05:05:33 -06:00
committed by Tom Rini
parent 63c5bf48d5
commit e003310a76
2 changed files with 14 additions and 12 deletions

View File

@@ -329,7 +329,9 @@ int bootstage_stash(void *base, int size);
*
* @param base Base address of memory buffer
* @param size Size of memory buffer (-1 if unknown)
* @return 0 if unstashed ok, -1 if bootstage info not found, or out of space
* @return 0 if unstashed ok, -ENOENT if bootstage info not found, -ENOSPC if
* there is not space for read the stacked data, or other error if
* something else went wrong
*/
int bootstage_unstash(void *base, int size);