diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-04-26 13:51:55 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-04-26 17:59:22 +0200 |
commit | 81310a62be3190b2e49b7b188469d0f463c9a866 (patch) | |
tree | 8727f0b185d041ce2dbfbce9ca9cb6608c4ab210 /OvmfPkg | |
parent | dea0d6bf2f19989f0583f8ae163571105645c6ca (diff) | |
download | edk2-platforms-81310a62be3190b2e49b7b188469d0f463c9a866.tar.xz |
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')
-rw-r--r-- | OvmfPkg/SataControllerDxe/SataController.c | 20 |
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
|