[edk2-devel] [PATCH v2 2/3] MdeModulePkg/UhciPei: Initialize the variable RequestMap

Zhang, Shenglei shenglei.zhang at intel.com
Wed Oct 30 14:08:29 UTC 2019


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 at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang at intel.com>
---
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
index b897c3f82ce6..a05834da3c4a 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;
   }
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#49663): https://edk2.groups.io/g/devel/message/49663
Mute This Topic: https://groups.io/mt/39796153/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list