summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-07-07 14:53:58 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-11 08:59:53 +0800
commita00df2e5626f6aafafb9bdfd3e189402b1329530 (patch)
tree74a466defab878cc4cac48bd30151ddcd32e6b05 /MdeModulePkg
parent072a3ca1d36a42aec97f871c808776ee7038ca06 (diff)
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 <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
index c251fbecb3..72efd56d48 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;