diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-05-20 14:27:17 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-21 09:13:19 -0400 |
commit | 7a0ad2cce3e84fdfb1d0f5b14b9e293cb6e69d71 (patch) | |
tree | 5d08f771fbc40b8ce9730afe92bba0e9d0c0ba64 | |
parent | 7acdf78108c6ffc1baa55a76d51dc7d4202d1e08 (diff) | |
download | u-boot-imx-7a0ad2cce3e84fdfb1d0f5b14b9e293cb6e69d71.zip u-boot-imx-7a0ad2cce3e84fdfb1d0f5b14b9e293cb6e69d71.tar.gz u-boot-imx-7a0ad2cce3e84fdfb1d0f5b14b9e293cb6e69d71.tar.bz2 |
env: Fix return values in env_attr_lookup()
This function returned numbers for error codes. Change them to error
codes.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/env_attr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/env_attr.c b/common/env_attr.c index 64baca5..e791f44 100644 --- a/common/env_attr.c +++ b/common/env_attr.c @@ -148,10 +148,10 @@ int env_attr_lookup(const char *attr_list, const char *name, char *attributes) if (!attributes) /* bad parameter */ - return -1; + return -EINVAL; if (!attr_list) /* list not found */ - return 1; + return -EINVAL; entry = reverse_strstr(attr_list, name, NULL); while (entry != NULL) { @@ -209,5 +209,5 @@ int env_attr_lookup(const char *attr_list, const char *name, char *attributes) } /* not found in list */ - return 2; + return -ENOENT; } |