mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/SdDxe: Check the Token to avoid null pointer
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2286 Token pointer may be NULL, it should be checked before use it. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
a1c35ff312
commit
695d90b9b1
|
@ -1367,7 +1367,14 @@ SdEraseBlocks (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "SdEraseBlocks(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", Lba, BlockNum, Token->Event, Status));
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"SdEraseBlocks(): Lba 0x%x BlkNo 0x%x Event %p with %r\n",
|
||||
Lba,
|
||||
BlockNum,
|
||||
(Token != NULL) ? Token->Event : NULL,
|
||||
Status
|
||||
));
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue