summaryrefslogtreecommitdiff
path: root/board/compulab/common
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2015-01-14 10:42:49 +0200
committerStefano Babic <sbabic@denx.de>2015-01-29 17:42:29 +0100
commit6947e3f56f265c9bb1f3832c74630adf6286987d (patch)
tree67e50fc5dde01bcbd1ea44176116149ae3e0fe21 /board/compulab/common
parent1c2e529243b126a15b604cadd96e5dff3ce225de (diff)
downloadu-boot-imx-6947e3f56f265c9bb1f3832c74630adf6286987d.zip
u-boot-imx-6947e3f56f265c9bb1f3832c74630adf6286987d.tar.gz
u-boot-imx-6947e3f56f265c9bb1f3832c74630adf6286987d.tar.bz2
compulab: splash: use errno values
Use errno values to improve return reporting. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'board/compulab/common')
-rw-r--r--board/compulab/common/splash.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/board/compulab/common/splash.c b/board/compulab/common/splash.c
index 49ed49b..33b2f9f 100644
--- a/board/compulab/common/splash.c
+++ b/board/compulab/common/splash.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <nand.h>
+#include <errno.h>
#include <bmp_layout.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -44,12 +45,12 @@ splash_address_too_high:
printf("Error: splashimage address too high. Data overwrites U-Boot "
"and/or placed beyond DRAM boundaries.\n");
- return -1;
+ return -EFAULT;
}
#else
static inline int splash_load_from_nand(u32 bmp_load_addr, int nand_offset)
{
- return -1;
+ return -ENOSYS;
}
#endif /* CONFIG_CMD_NAND */
@@ -60,12 +61,12 @@ int cl_splash_screen_prepare(int nand_offset)
env_splashimage_value = getenv("splashimage");
if (env_splashimage_value == NULL)
- return -1;
+ return -ENOENT;
bmp_load_addr = simple_strtoul(env_splashimage_value, 0, 16);
if (bmp_load_addr == 0) {
printf("Error: bad splashimage address specified\n");
- return -1;
+ return -EFAULT;
}
return splash_load_from_nand(bmp_load_addr, nand_offset);