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
This commit is contained in:
qianouyang
2011-05-06 07:15:41 +00:00
parent 58f8069039
commit d0844d133b
2 changed files with 30 additions and 49 deletions

View File

@@ -794,7 +794,7 @@ ErrorExit:
);
}
if (Instance->TimerEvent != NULL) {
if ((Instance != NULL) && (Instance->TimerEvent != NULL)) {
gBS->CloseEvent (Instance->TimerEvent);
}