diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-04-24 13:32:04 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-04-25 09:10:14 +0800 |
commit | 4d3f4a20f180bcc81c467622e56388f96faa84a4 (patch) | |
tree | e7b7b430b03ca6c34c4f057e053ecafb6ed97786 /MdeModulePkg/Bus/Pci | |
parent | 9fe5799446d132d5b9cb5e1bb64265947e02221d (diff) | |
download | edk2-4d3f4a20f180bcc81c467622e56388f96faa84a4.tar.gz edk2-4d3f4a20f180bcc81c467622e56388f96faa84a4.tar.bz2 edk2-4d3f4a20f180bcc81c467622e56388f96faa84a4.zip |
MdeModulePkg/UfsPciHc: Avoid overriding return value in BindingStart
In function UfsHcDriverBindingStart(), the return value 'Status' may be
overridden during the original PCI attributes restore process.
This commit refines the logic to avoid such override.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
(cherry picked from commit 1a5ae661754625b8f4bba39214006e87216747e9)
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c index 373e55b4c2..96cf39adc1 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c @@ -671,13 +671,12 @@ Done: //
// Restore original PCI attributes
//
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationSet,
- Private->PciAttributes,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
+ PciIo->Attributes (
+ PciIo,
+ EfiPciIoAttributeOperationSet,
+ Private->PciAttributes,
+ NULL
+ );
}
gBS->CloseProtocol (
Controller,
|