SdReadWrite can be called with a NULL Token for synchronous operations.
Add guard for DEBUG print to only print event pointer with Token is not
NULL.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- DEBUG ((DEBUG_BLKIO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, Status));\r
-\r
+ DEBUG ((DEBUG_BLKIO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n",\r
+ IsRead ? "Read" : "Write", Lba, BlockNum,\r
+ (Token != NULL) ? Token->Event : NULL, Status));\r
Lba += BlockNum;\r
Buffer = (UINT8*)Buffer + BufferSize;\r
Remaining -= BlockNum;\r