]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/NonDiscoverablePciDevice: Remove the redundant check
authorDandan Bi <dandan.bi@intel.com>
Fri, 28 Dec 2018 05:17:50 +0000 (13:17 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 8 Jan 2019 01:59:30 +0000 (09:59 +0800)
commita53a888de8f5fa8dbf75a381e28f25a5497572f1
treed9176a19ce6f417e093a3e660daae36c539c3932
parent9248a4717a9e269670be964b56bc1a1219cae2b2
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>
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c