]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UhciPei: Initialize the variable RequestMap
authorShenglei Zhang <shenglei.zhang@intel.com>
Tue, 15 Oct 2019 02:06:42 +0000 (10:06 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 4 Nov 2019 00:56:12 +0000 (08:56 +0800)
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>
MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c

index b897c3f82ce6e61734ddadb39639d86f5871ae96..a05834da3c4a4bd72d52fa69166af64574aa72f5 100644 (file)
@@ -274,6 +274,8 @@ UhcControlTransfer (
 \r
   PktID       = INPUT_PACKET_ID;\r
 \r
+  RequestMap  = NULL;\r
+\r
   if (Request == NULL || TransferResult == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r