summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorShenglei Zhang <shenglei.zhang@intel.com>2019-10-15 10:06:42 +0800
committerLiming Gao <liming.gao@intel.com>2019-11-04 08:56:12 +0800
commita857ea4199ead1858e55b081fea38fcf0e721c8c (patch)
tree8b9f51efbd516b95648819028338bc909360fbdf /MdeModulePkg/Bus
parent7a2505bb0f64a266002737ea8446f14cc4095a22 (diff)
downloadedk2-a857ea4199ead1858e55b081fea38fcf0e721c8c.tar.gz
edk2-a857ea4199ead1858e55b081fea38fcf0e721c8c.tar.bz2
edk2-a857ea4199ead1858e55b081fea38fcf0e721c8c.zip
MdeModulePkg/UhciPei: Initialize the variable RequestMap
RequestMap is used but not Initialized. RequestMap is called by UhciMapUserRequest, in which RequestMap(Map) is called by IoMmuMap, and is finally called by IoMmu->Map. We can not assume RequestMap is given an initial value at any step. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
index b897c3f82c..a05834da3c 100644
--- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
+++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
@@ -274,6 +274,8 @@ UhcControlTransfer (
PktID = INPUT_PACKET_ID;
+ RequestMap = NULL;
+
if (Request == NULL || TransferResult == NULL) {
return EFI_INVALID_PARAMETER;
}