summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index a512c2c251..9dde9fddfa 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -4234,15 +4234,17 @@ ShellConvertStringToUint64 (
Status = InternalShellStrDecimalToUint64 (Walker, &RetVal, StopAtSpace);
}
- if ((Value == NULL) && !EFI_ERROR (Status)) {
- return (EFI_NOT_FOUND);
+ if (EFI_ERROR (Status)) {
+ return EFI_INVALID_PARAMETER;
}
- if (Value != NULL) {
- *Value = RetVal;
+ if (Value == NULL) {
+ return EFI_NOT_FOUND;
}
- return (Status);
+ *Value = RetVal;
+
+ return EFI_SUCCESS;
}
/**