diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c index 27dae58553..381dcb1e97 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c @@ -874,6 +874,10 @@ Ip4FormExtractConfig ( EFI_STRING FormResult; UINTN Size; UINTN BufferSize; + + if (Progress == NULL || Results == NULL) { + return EFI_INVALID_PARAMETER; + } Status = EFI_SUCCESS; IfrFormNvData = NULL; @@ -887,10 +891,6 @@ Ip4FormExtractConfig ( BufferSize = sizeof (IP4_CONFIG2_IFR_NVDATA); *Progress = Request; - if (Progress == NULL || Results == NULL) { - return EFI_INVALID_PARAMETER; - } - // // Check Request data in . //