summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
index 8ca9e6aa5b..eb88fa288a 100644
--- a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
+++ b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
@@ -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;