diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c index b53709b493..6d97994b5c 100644 --- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c +++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c @@ -324,7 +324,7 @@ RamDiskUnregister ( &gEfiBlockIo2ProtocolGuid, &PrivateData->BlockIo2, &gEfiDevicePathProtocolGuid, - DevicePath, + (EFI_DEVICE_PATH_PROTOCOL *) PrivateData->DevicePath, NULL );