From d0844d133bf1b76abfbc83387758fdd01360334b Mon Sep 17 00:00:00 2001 From: qianouyang Date: Fri, 6 May 2011 07:15:41 +0000 Subject: Add Pointer check for NULL before referring it and remove unnecessary pointer check in AtaAtapiPassThru and Partition Drivers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11627 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MdeModulePkg/Bus') diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c index 3e135d74ec..526590718a 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c @@ -794,7 +794,7 @@ ErrorExit: ); } - if (Instance->TimerEvent != NULL) { + if ((Instance != NULL) && (Instance->TimerEvent != NULL)) { gBS->CloseEvent (Instance->TimerEvent); } -- cgit v1.2.3