@param [in] Controller Handle of device to work with.\r
\r
@retval EFI_SUCCESS This driver is added to Controller.\r
- @retval other This driver does not support this device.\r
+ @retval EFI_OUT_OF_RESOURCES No more memory available.\r
+ @retval EFI_UNSUPPORTED This driver does not support this device.\r
\r
**/\r
EFI_STATUS\r
)\r
{\r
BOOLEAN bInUse;\r
+ EFI_STATUS ExitStatus;\r
UINTN LengthInBytes;\r
UINT8 * pBuffer;\r
CONST ESL_SOCKET_BINDING * pEnd;\r
//\r
// Assume the list is empty\r
//\r
- Status = EFI_UNSUPPORTED;\r
+ ExitStatus = EFI_UNSUPPORTED;\r
bInUse = FALSE;\r
\r
//\r
RESTORE_TPL ( TplPrevious );\r
\r
//\r
- // Determine if the initialization was successful\r
+ // At least one service was made available\r
//\r
- if ( EFI_ERROR ( Status )) {\r
- DEBUG (( DEBUG_ERROR | DEBUG_POOL | DEBUG_INIT,\r
- "ERROR - Failed to initialize service %s on 0x%08x, Status: %r\r\n",\r
- pSocketBinding->pName,\r
- Controller,\r
- Status ));\r
-\r
- //\r
- // Free the network service binding if necessary\r
- //\r
- gBS->UninstallMultipleProtocolInterfaces (\r
- Controller,\r
- pSocketBinding->pTagGuid,\r
- pService,\r
- NULL );\r
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,\r
- "Removed: %s TagGuid from 0x%08x\r\n",\r
- pSocketBinding->pName,\r
- Controller ));\r
- }\r
+ ExitStatus = EFI_SUCCESS;\r
}\r
else {\r
DEBUG (( DEBUG_ERROR | DEBUG_POOL | DEBUG_INIT,\r
DEBUG (( DEBUG_ERROR | DEBUG_INIT,\r
"ERROR - Failed service allocation, Status: %r\r\n",\r
Status ));\r
+ ExitStatus = EFI_OUT_OF_RESOURCES;\r
+ break;\r
}\r
}\r
}\r
//\r
// Display the driver start status\r
//\r
- DBG_EXIT_STATUS ( Status );\r
- return Status;\r
+ DBG_EXIT_STATUS ( ExitStatus );\r
+ return ExitStatus;\r
}\r
\r
\r