From 2c46dd239b4c50e9b76a1ef72a9011c5754f5c43 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Wed, 11 Jul 2012 19:08:40 +0000 Subject: ShellPkg: update pci enumeration routine for platforms with multiple pci segments. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen eugene@hp.com reviewed-by: jaben carsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13524 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib') diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c index 017c33780a..ce55d6e332 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c @@ -2464,13 +2464,11 @@ PciFindProtocolInterface ( { UINTN Index; EFI_STATUS Status; - BOOLEAN FoundInterface; EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptors; UINT16 MinBus; UINT16 MaxBus; BOOLEAN IsEnd; - FoundInterface = FALSE; // // Go through all handles, until the one meets the criteria is found // @@ -2502,17 +2500,12 @@ PciFindProtocolInterface ( } if (MinBus <= Bus && MaxBus >= Bus) { - FoundInterface = TRUE; - break; + return EFI_SUCCESS; } } } - if (FoundInterface) { - return EFI_SUCCESS; - } else { - return EFI_INVALID_PARAMETER; - } + return EFI_NOT_FOUND; } /** -- cgit v1.2.3