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>
This commit is contained in:
Shenglei Zhang 2019-10-15 10:06:42 +08:00 committed by Liming Gao
parent 7a2505bb0f
commit a857ea4199
1 changed files with 2 additions and 0 deletions

View File

@ -274,6 +274,8 @@ UhcControlTransfer (
PktID = INPUT_PACKET_ID;
RequestMap = NULL;
if (Request == NULL || TransferResult == NULL) {
return EFI_INVALID_PARAMETER;
}