From a00df2e5626f6aafafb9bdfd3e189402b1329530 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Thu, 7 Jul 2016 14:53:58 +0800 Subject: 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Feng Tian --- 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 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; -- cgit v1.2.3