summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
index 564db83c90..8ca9e6aa5b 100644
--- a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
+++ b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
@@ -154,7 +154,7 @@ DmaAllocateAlignedBuffer (
//
if (MemoryType == EfiBootServicesData) {
*HostAddress = AllocateAlignedPages (Pages, Alignment);
- } else if (MemoryType != EfiRuntimeServicesData) {
+ } else if (MemoryType == EfiRuntimeServicesData) {
*HostAddress = AllocateAlignedRuntimePages (Pages, Alignment);
} else {
return EFI_INVALID_PARAMETER;