diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index dcfe1e865d..4f83a92a36 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -684,6 +684,8 @@ NvmeCreateIoCompletionQueue ( NVME_ADMIN_CRIOCQ CrIoCq; UINT32 Index; + Status = EFI_SUCCESS; + for (Index = 1; Index < NVME_MAX_QUEUES; Index++) { ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET)); ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND)); @@ -740,6 +742,8 @@ NvmeCreateIoSubmissionQueue ( NVME_ADMIN_CRIOSQ CrIoSq; UINT32 Index; + Status = EFI_SUCCESS; + for (Index = 1; Index < NVME_MAX_QUEUES; Index++) { ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET)); ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND));