MdeModulePkg/VarCheckHiiLib: don't return success for invalid input

The doxygen comment for VarCheckHiiLibReceiveHiiBinHandler says that
EFI_INVALID_PARAMETER should be returned if either of CommBuffer or
CommBufferSize is NULL, but the test results in an early return of
EFI_SUCCESS.

Update the code to match the documentation.

Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
This commit is contained in:
Leif Lindholm 2025-02-12 18:57:17 +00:00 committed by mergify[bot]
parent 1c6ce560f0
commit f6aba88ac8
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ VarCheckHiiLibReceiveHiiBinHandler (
// If input is invalid, stop processing this SMI
//
if ((CommBuffer == NULL) || (CommBufferSize == NULL)) {
return EFI_SUCCESS;
return EFI_INVALID_PARAMETER;
}
mMmReceivedVarCheckHiiBinSize = *CommBufferSize;