DEBUG_CODE_BEGIN();\r
if (EFI_ERROR(Status)) {\r
// We convert back to the text representation of the device Path\r
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;\r
- CHAR16* DevicePathTxt;\r
- EFI_STATUS Status;\r
+ EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevicePathToTextProtocol;\r
+ CHAR16 *DevicePathTxt;\r
\r
- Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);\r
- if (!EFI_ERROR(Status)) {\r
+ DevicePathToTextProtocol = NULL;\r
+ gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **) &DevicePathToTextProtocol);\r
+ if (DevicePathToTextProtocol != NULL) {\r
DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText (DevicePath, TRUE, TRUE);\r
\r
DEBUG((EFI_D_ERROR,"Fail to start the console with the Device Path '%s'. (Error '%r')\n", DevicePathTxt, Status));\r