]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/Locate.c
MdeModulePkg/Core: Fix typos in comments
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / Locate.c
index 585d3c8253a0546a493ec87099840517adaae3c5..a7220bae86af223744523db54eaf889a1cc36d11 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Locate handle functions\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation.  All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials are licensed and made available \r
   under the terms and conditions of the BSD License which accompanies this \r
   distribution.  The full text of the license may be found at        \r
@@ -321,14 +321,13 @@ SmmLocateHandle (
     break;\r
 \r
   case ByRegisterNotify:\r
+    GetNext = SmmGetNextLocateByRegisterNotify;\r
     //\r
     // Must have SearchKey for locate ByRegisterNotify\r
     //\r
     if (SearchKey == NULL) {\r
       Status = EFI_INVALID_PARAMETER;\r
-      break;\r
     }\r
-    GetNext = SmmGetNextLocateByRegisterNotify;\r
     break;\r
 \r
   case ByProtocol:\r
@@ -399,6 +398,7 @@ SmmLocateHandle (
     *BufferSize = ResultSize;\r
 \r
     if (SearchType == ByRegisterNotify && !EFI_ERROR(Status)) {\r
+      ASSERT (SearchKey != NULL);\r
       //\r
       // If this is a search by register notify and a handle was\r
       // returned, update the register notification position\r
@@ -430,7 +430,7 @@ SmmLocateHandle (
   @retval EFI_NOT_FOUND          No handles match the search.\r
   @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the\r
                                  matching results.\r
-  @retval EFI_INVALID_PARAMETER  One or more paramters are not valid.\r
+  @retval EFI_INVALID_PARAMETER  One or more parameters are not valid.\r
 \r
 **/\r
 EFI_STATUS\r