Reviewed-by: Feng Tian <[email protected]>

Thanks
Feng

-----Original Message-----
From: Wu, Hao A 
Sent: Thursday, July 7, 2016 4:10 PM
To: [email protected]
Cc: Wu, Hao A <[email protected]>; Tian, Feng <[email protected]>
Subject: [PATCH v2] MdeModulePkg SdBlockIoPei: Initialize 'SwitchResp' elements 
before using

The commit makes sure that the elements in array 'SwitchResp' get initialized 
before being used.

Cc: Feng Tian <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
---
 MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c 
b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
index c251fbe..72efd56 100644
--- a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
+++ b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
@@ -2647,6 +2647,7 @@ SdPeimSetBusMode (
   //
   // Get the supported bus speed from SWITCH cmd return data group #1.
   //
+  ZeroMem (SwitchResp, sizeof (SwitchResp));
   Status = SdPeimSwitch (Slot, 0xF, 0xF, 0xF, 0xF, FALSE, SwitchResp);
   if (EFI_ERROR (Status)) {
     return Status;
--
1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to