mirror of https://github.com/acidanthera/audk.git
EmbeddedPkg/CoherentDmaLib: Add missing checks to DmaMap
UEFI Sct validates Dma mapping. For CoherentDmaLib it always failed because there were no required checks present in DmaMap. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
c783da6599
commit
c4709260f6
|
@ -58,6 +58,12 @@ DmaMap (
|
|||
OUT VOID **Mapping
|
||||
)
|
||||
{
|
||||
if (HostAddress == NULL ||
|
||||
NumberOfBytes == NULL ||
|
||||
DeviceAddress == NULL ||
|
||||
Mapping == NULL ) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
*DeviceAddress = HostToDeviceAddress (HostAddress);
|
||||
*Mapping = NULL;
|
||||
return EFI_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue