/**\r
This function will connect all the system driver to controller\r
first, and then special connect the default console, this make\r
- sure all the system controller avialbe and the platform default\r
+ sure all the system controller available and the platform default\r
console connected.\r
\r
**/\r
/**\r
This function will connect all the system drivers to all controllers\r
first, and then connect all the console devices the system current\r
- have. After this we should get all the device work and console avariable\r
+ have. After this we should get all the device work and console available\r
if the system have console device.\r
\r
- None\r
-\r
- @return None\r
-\r
**/\r
VOID\r
BdsLibGenericConnectAll (\r
} while (DevicePath != NULL);\r
\r
if (CopyOfDevicePath != NULL) {\r
- gBS->FreePool (CopyOfDevicePath);\r
+ FreePool (CopyOfDevicePath);\r
}\r
//\r
// All handle with DevicePath exists in the handle database\r
Status = gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);\r
}\r
\r
- gBS->FreePool (HandleBuffer);\r
+ if (HandleBuffer != NULL) {\r
+ FreePool (HandleBuffer);\r
+ }\r
\r
return EFI_SUCCESS;\r
}\r
Status = gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);\r
}\r
\r
- gBS->FreePool (HandleBuffer);\r
+ if (HandleBuffer != NULL) {\r
+ FreePool (HandleBuffer);\r
+ }\r
\r
return EFI_SUCCESS;\r
}\r
\r
/**\r
Connect the specific Usb device which match the short form device path,\r
- and whose bus is determined by Host Controller (Uhci or Ehci)\r
+ and whose bus is determined by Host Controller (Uhci or Ehci).\r
\r
@param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci and ehci\r
(0xFF)\r
element being a USB WWID or a USB Class device\r
path\r
\r
- @return EFI_INVALID_PARAMETER\r
- @return EFI_SUCCESS\r
- @return EFI_NOT_FOUND\r
+ @return EFI_INVALID_PARAMETER RemainingDevicePath is NULL pointer.\r
+ RemainingDevicePath is not a USB device path.\r
+ Invalid HostControllerPI type.\r
+ @return EFI_SUCCESS Success to connect USB device\r
+ @return EFI_NOT_FOUND Fail to find handle for USB controller to connect.\r
\r
**/\r
EFI_STATUS\r