mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/NonDiscoverablePciDevice: Remove the redundant check
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1422 if (Attributes) { if ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) != 0) { return EFI_UNSUPPORTED; } } In above code block, "If ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) != 0)" is TRUE, the Attributes must be not 0. So we can remove the redundant check "if (Attributes)". Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
9248a4717a
commit
a53a888de8
|
@ -1276,11 +1276,9 @@ PciIoAttributes (
|
||||||
|
|
||||||
Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
|
Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
|
||||||
|
|
||||||
if (Attributes) {
|
if ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) != 0) {
|
||||||
if ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) != 0) {
|
return EFI_UNSUPPORTED;
|
||||||
return EFI_UNSUPPORTED;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Enable = FALSE;
|
Enable = FALSE;
|
||||||
switch (Operation) {
|
switch (Operation) {
|
||||||
|
|
Loading…
Reference in New Issue