diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-06 07:15:41 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-06 07:15:41 +0000 |
commit | d0844d133bf1b76abfbc83387758fdd01360334b (patch) | |
tree | 94185f7359ea077939c486ad48ded5c13ec7666f /MdeModulePkg/Bus | |
parent | 58f8069039c9e664cd1826d4ac84e73a755b034b (diff) | |
download | edk2-platforms-d0844d133bf1b76abfbc83387758fdd01360334b.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 2 |
1 files changed, 1 insertions, 1 deletions
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);
}
|