summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index 7626bac38d..bda900a161 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -886,6 +886,13 @@ AhciPrintStatusBlock (
)
{
//
+ // Skip NULL pointer
+ //
+ if (AtaStatusBlock == NULL) {
+ return;
+ }
+
+ //
// Only print status and error since we have all of the rest printed as
// a part of command block print.
//