MdeModulePkg/SataControllerDxe: Remove useless null check
ASSERT (Private != NULL) already covers this check.
See commit 81310a6
.
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
897a2b447e
commit
82b81c6464
@ -626,34 +626,32 @@ SataControllerStop (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private != NULL) {
|
if (Private->DisqualifiedModes != NULL) {
|
||||||
if (Private->DisqualifiedModes != NULL) {
|
FreePool (Private->DisqualifiedModes);
|
||||||
FreePool (Private->DisqualifiedModes);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Private->IdentifyData != NULL) {
|
|
||||||
FreePool (Private->IdentifyData);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Private->IdentifyValid != NULL) {
|
|
||||||
FreePool (Private->IdentifyValid);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Private->PciAttributesChanged) {
|
|
||||||
//
|
|
||||||
// Restore original PCI attributes
|
|
||||||
//
|
|
||||||
Private->PciIo->Attributes (
|
|
||||||
Private->PciIo,
|
|
||||||
EfiPciIoAttributeOperationSet,
|
|
||||||
Private->OriginalPciAttributes,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
FreePool (Private);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Private->IdentifyData != NULL) {
|
||||||
|
FreePool (Private->IdentifyData);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Private->IdentifyValid != NULL) {
|
||||||
|
FreePool (Private->IdentifyValid);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Private->PciAttributesChanged) {
|
||||||
|
//
|
||||||
|
// Restore original PCI attributes
|
||||||
|
//
|
||||||
|
Private->PciIo->Attributes (
|
||||||
|
Private->PciIo,
|
||||||
|
EfiPciIoAttributeOperationSet,
|
||||||
|
Private->OriginalPciAttributes,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
FreePool (Private);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close protocols opened by Sata Controller driver
|
// Close protocols opened by Sata Controller driver
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user