/** @file\r
Data Hub status code worker.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Cache data hub protocol.\r
//\r
-EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;\r
+EFI_DATA_HUB_PROTOCOL *mDataHubProtocol = NULL;\r
\r
\r
/**\r
BASE_LIST Marker;\r
CHAR8 *Format;\r
UINTN CharCount;\r
+ EFI_STATUS Status;\r
\r
//\r
// Use atom operation to avoid the reentant of report.\r
return EFI_DEVICE_ERROR;\r
}\r
\r
+ if (mDataHubProtocol == NULL) {\r
+ Status = DataHubStatusCodeInitializeWorker ();\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ }\r
+ \r
Record = AcquireRecordBuffer ();\r
if (Record == NULL) {\r
//\r
NULL, \r
(VOID **) &mDataHubProtocol\r
);\r
- ASSERT_EFI_ERROR (Status);\r
+ if (EFI_ERROR (Status)) {\r
+ mDataHubProtocol = NULL;\r
+ return Status;\r
+ }\r
\r
//\r
// Create a Notify Event to log data in Data Hub\r