diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-05-25 10:00:08 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-05-26 08:33:27 +0800 |
commit | 6b571c4d8c827a39a5e249d5d9db4f99aebb5d63 (patch) | |
tree | e227c807e70b0dde35402ff1e1eb811e062be2dd /MdeModulePkg/Bus | |
parent | 855743f7177459bea95798e59b6b18dab867710c (diff) | |
download | edk2-platforms-6b571c4d8c827a39a5e249d5d9db4f99aebb5d63.tar.xz |
MdeModulePkg NvmExpressDxe: Fix VS2010 build error
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>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 4 |
1 files changed, 4 insertions, 0 deletions
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));
|