]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg NvmExpressDxe: Fix VS2010 build error
authorHao Wu <hao.a.wu@intel.com>
Wed, 25 May 2016 02:00:08 +0000 (10:00 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 26 May 2016 00:33:27 +0000 (08:33 +0800)
Potentially uninitialized 'Status' might be returned in functions
NvmeCreateIoCompletionQueue() and NvmeCreateIoSubmissionQueue() in file
NvmExpressHci.c.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c

index dcfe1e865de569395434a4ec82ce17939b7d536e..4f83a92a364aeb266960fec7566dd73f8cc99966 100644 (file)
@@ -684,6 +684,8 @@ NvmeCreateIoCompletionQueue (
   NVME_ADMIN_CRIOCQ                        CrIoCq;\r
   UINT32                                   Index;\r
 \r
+  Status = EFI_SUCCESS;\r
+\r
   for (Index = 1; Index < NVME_MAX_QUEUES; Index++) {\r
     ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));\r
     ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND));\r
@@ -740,6 +742,8 @@ NvmeCreateIoSubmissionQueue (
   NVME_ADMIN_CRIOSQ                        CrIoSq;\r
   UINT32                                   Index;\r
 \r
+  Status = EFI_SUCCESS;\r
+\r
   for (Index = 1; Index < NVME_MAX_QUEUES; Index++) {\r
     ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));\r
     ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND));\r