diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c index b83babf081..6c8d4b2df6 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -656,7 +656,7 @@ AhciPioTransfer ( ); if (EFI_ERROR (Status) || (DataCount != MapLength)) { - return EFI_OUT_OF_RESOURCES; + return EFI_BAD_BUFFER_SIZE; } // @@ -877,7 +877,7 @@ AhciDmaTransfer ( ); if (EFI_ERROR (Status) || (DataCount != MapLength)) { - return EFI_OUT_OF_RESOURCES; + return EFI_BAD_BUFFER_SIZE; } if (Task != NULL) {