]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Bug Fix in DxeSmmDriverEntryLib.
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Sep 2008 03:42:07 +0000 (03:42 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Sep 2008 03:42:07 +0000 (03:42 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5928 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c

index df25c6d49339dcc65453651f4c4799103db9ee03..539adc1345dcfc6a73e94f2a0fb9d3df2a34ef22 100644 (file)
@@ -133,26 +133,14 @@ _DriverUnloadHandler (
   EFI_HANDLE ImageHandle\r
   )\r
 {\r
-  EFI_STATUS  Status;\r
-\r
-  //\r
-  // Call the unload handlers for all the modules\r
   //\r
-  Status = ProcessModuleUnloadList (ImageHandle);\r
-\r
+  // Call the unload handlers for all the modules.\r
+  // \r
+  // Note: All libraries were constructed in SMM space, \r
+  // therefore we can not destruct them in Unload \r
+  // handler.\r
   //\r
-  // If the driver specific unload handler does not return an error, then call all of the\r
-  // library destructors.  If the unload handler returned an error, then the driver can not be\r
-  // unloaded, and the library destructors should not be called\r
-  //\r
-  if (!EFI_ERROR (Status)) {\r
-    ProcessLibraryDestructorList (ImageHandle, gST);\r
-  }\r
-\r
-  //\r
-  // Return the status from the driver specific unload handler\r
-  //\r
-  return Status;\r
+  return ProcessModuleUnloadList (ImageHandle);\r
 }\r
 \r
 /**\r