mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
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>
This commit is contained in:
parent
7acdf78108
commit
7a0ad2cce3
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue