summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/SataControllerDxe
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-04-26 13:51:55 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-04-26 17:59:22 +0200
commit81310a62be3190b2e49b7b188469d0f463c9a866 (patch)
tree8727f0b185d041ce2dbfbce9ca9cb6608c4ab210 /OvmfPkg/SataControllerDxe
parentdea0d6bf2f19989f0583f8ae163571105645c6ca (diff)
downloadedk2-81310a62be3190b2e49b7b188469d0f463c9a866.tar.gz
edk2-81310a62be3190b2e49b7b188469d0f463c9a866.tar.bz2
edk2-81310a62be3190b2e49b7b188469d0f463c9a866.zip
OvmfPkg: SataControllerDxe: SataControllerStop: remove useless null check
"ASSERT (SataPrivateData != NULL)" is just a few lines higher up. Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/SataControllerDxe')
-rw-r--r--OvmfPkg/SataControllerDxe/SataController.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/OvmfPkg/SataControllerDxe/SataController.c b/OvmfPkg/SataControllerDxe/SataController.c
index ba21717cad..e5ee63a0ab 100644
--- a/OvmfPkg/SataControllerDxe/SataController.c
+++ b/OvmfPkg/SataControllerDxe/SataController.c
@@ -602,18 +602,16 @@ SataControllerStop (
return Status;
}
- if (SataPrivateData != NULL) {
- if (SataPrivateData->DisqualifiedModes != NULL) {
- FreePool (SataPrivateData->DisqualifiedModes);
- }
- if (SataPrivateData->IdentifyData != NULL) {
- FreePool (SataPrivateData->IdentifyData);
- }
- if (SataPrivateData->IdentifyValid != NULL) {
- FreePool (SataPrivateData->IdentifyValid);
- }
- FreePool (SataPrivateData);
+ if (SataPrivateData->DisqualifiedModes != NULL) {
+ FreePool (SataPrivateData->DisqualifiedModes);
}
+ if (SataPrivateData->IdentifyData != NULL) {
+ FreePool (SataPrivateData->IdentifyData);
+ }
+ if (SataPrivateData->IdentifyValid != NULL) {
+ FreePool (SataPrivateData->IdentifyValid);
+ }
+ FreePool (SataPrivateData);
//
// Restore original PCI attributes