Skip to content

Commit

Permalink
OvmfPkg: SataControllerDxe: SataControllerStop: remove useless null c…
Browse files Browse the repository at this point in the history
…heck

"ASSERT (SataPrivateData != NULL)" is just a few lines higher up.

Cc: Jordan Justen <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
  • Loading branch information
lersek committed Apr 26, 2016
1 parent dea0d6b commit 81310a6
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions OvmfPkg/SataControllerDxe/SataController.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81310a6

Please sign in to comment.