Looks good to me, but I’m not an official reviewer.

 

- Bret

 


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Guomin Jiang via Groups.Io <guomin.jiang=intel.com@groups.io>
Sent: Wednesday, March 18, 2020 6:33:43 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Subject: [EXTERNAL] [edk2-devel] [edk2-platforms][PATCH] IntelSiliconPkg/IntelPciDeviceSecurityDxe: Replace ASSERT_EFI_ERROR
 
REF: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2589&amp;data=02%7C01%7Cbret.barkelew%40microsoft.com%7C4480a52ff6784232720d08d7ced91c8d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637205304196996734&amp;sdata=PqgTLSHlFecHZWmVyxA1f4BJDiRkOxrBLSpVQV%2B5bcI%3D&amp;reserved=0

According to code logic, it just judge the condition rather than the
status, it should use the ASSERT rather than ASSERT_EFI_ERROR.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index 29b6916f61..aa2bf14fa8 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -69,7 +69,7 @@ RecordPciDeviceInList(
   ASSERT_EFI_ERROR(Status);

 

   NewPciDevice = AllocateZeroPool(sizeof(*NewPciDevice));

-  ASSERT_EFI_ERROR(NewPciDevice != NULL);

+  ASSERT(NewPciDevice != NULL);

 

   NewPciDevice->Signature   = PCI_DEVICE_INSTANCE_SIGNATURE;

   NewPciDevice->PciSegment  = PciSegment;

--
2.25.1.windows.1


-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56082): https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F56082&amp;data=02%7C01%7Cbret.barkelew%40microsoft.com%7C4480a52ff6784232720d08d7ced91c8d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637205304196996734&amp;sdata=QTZLYm%2FZa%2BnAHSoQG%2BJDbjDu5KMYyWjXYtJuLr6bW3U%3D&amp;reserved=0
Mute This Topic: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.io%2Fmt%2F72484273%2F1852292&amp;data=02%7C01%7Cbret.barkelew%40microsoft.com%7C4480a52ff6784232720d08d7ced91c8d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637205304196996734&amp;sdata=Xi5DewUud2C5gHqx1clGGcNnJ7cZFaPPJV2RlKnQ2gI%3D&amp;reserved=0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&amp;data=02%7C01%7Cbret.barkelew%40microsoft.com%7C4480a52ff6784232720d08d7ced91c8d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637205304196996734&amp;sdata=YBaUMmZLuEmg64IxWcwicaqnJZlq3RtG3CAXJvAK1%2Fk%3D&amp;reserved=0  [bret.barkelew@microsoft.com]
-=-=-=-=-=-=