]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c
EmbeddedPkg/NonCoherentDmaLib: Avoid dereferencing unset Map field
[mirror_edk2.git] / EmbeddedPkg / Library / NonCoherentDmaLib / NonCoherentDmaLib.c
index 9c8ef5bfb533b1d4c480b4c4cfd3fe50a27bd936..1aec86fffd06c8b94aabbb135169e19b81929cfd 100644 (file)
@@ -224,7 +224,7 @@ DmaMap (
       goto FreeMapInfo;\r
     }\r
 \r
-    if (Map->Operation == MapOperationBusMasterRead) {\r
+    if (Operation == MapOperationBusMasterRead) {\r
       CopyMem (Map->BufferAddress, (VOID *)(UINTN)HostAddress, *NumberOfBytes);\r
     }\r
     mCpu->FlushDataCache (mCpu, (UINTN)Map->BufferAddress, AllocSize,\r