> -----Original Message-----
> From: Zhang, Shenglei
> Sent: Wednesday, October 30, 2019 10:08 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A; Ni, Ray
> Subject: [PATCH v2 2/3] 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.


Reviewed-by: Hao A Wu <hao.a...@intel.com>

Best Regards,
Hao Wu


> 
> Cc: Hao A Wu <hao.a...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zh...@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 (#49706): https://edk2.groups.io/g/devel/message/49706
Mute This Topic: https://groups.io/mt/39796153/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to