]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
ShellPkg: Initialize the local pointer to avoid potential suspicious dereference.
[mirror_edk2.git] / DuetPkg / PciBusNoEnumerationDxe / PciEnumeratorSupport.c
index fb41727e7ac4ff082ddc6d069028b4ab82f6f1fd..80b2b6b24d24f7bc8e0ee27d615c0d863779dd8e 100644 (file)
@@ -1,6 +1,7 @@
 /*++\r
 \r
 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -216,6 +217,13 @@ Returns:
                 (UINT8) Func\r
                 );\r
 \r
+      if (EFI_ERROR (Status) && Func == 0) {\r
+        //\r
+        // go to next device if there is no Function 0\r
+        //\r
+        break;\r
+      }\r
+\r
       if (!EFI_ERROR (Status)) {\r
 \r
         //\r