]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/EhciPei: Initialize the variable Map
authorShenglei Zhang <shenglei.zhang@intel.com>
Wed, 9 Oct 2019 06:28:50 +0000 (14:28 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 4 Nov 2019 00:56:12 +0000 (08:56 +0800)
Map is used but not Initialized.
Map is called by IoMmuMap, in which Mapping(Map) is called by IoMmu->Map.
We can not assume Map 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/EhciPei/EhciUrb.c

index 7c6a6a5f9716a4d31dfb9d5cef567b361a6e0f41..995ccd2463d2b42836b15871062ee73ea1c4b32d 100644 (file)
@@ -534,6 +534,8 @@ EhcCreateUrb (
   PEI_URB                       *Urb;\r
   VOID                          *Map;\r
 \r
+  Map = NULL;\r
+\r
   Urb = Ehc->Urb;\r
   Urb->Signature  = EHC_URB_SIG;\r
   InitializeListHead (&Urb->UrbList);\r