-/** @file\r
+/** @file\r
UEFI variable support functions for Firmware Management Protocol based\r
firmware updates.\r
\r
Version = DEFAULT_VERSION;\r
\r
Status = GetVariable2 (VARNAME_VERSION, &gEfiCallerIdGuid, (VOID **)&Value, &Size);\r
- if (EFI_ERROR (Status)) {\r
+ if (EFI_ERROR (Status) || (Value == NULL)) {\r
DEBUG ((DEBUG_ERROR, "Failed to get the Version from variable. Status = %r\n", Status));\r
return Version;\r
}\r
Version = DEFAULT_LOWESTSUPPORTEDVERSION;\r
\r
Status = GetVariable2 (VARNAME_LSV, &gEfiCallerIdGuid, (VOID **)&Value, &Size);\r
- if (EFI_ERROR (Status)) {\r
+ if (EFI_ERROR (Status) || (Value == NULL)) {\r
DEBUG ((DEBUG_WARN, "Warning: Failed to get the Lowest Supported Version from variable. Status = %r\n", Status));\r
return Version;\r
}\r
LastAttemptStatus = DEFAULT_LASTATTEMPT;\r
\r
Status = GetVariable2 (VARNAME_LASTATTEMPTSTATUS, &gEfiCallerIdGuid, (VOID **)&Value, &Size);\r
- if (EFI_ERROR (Status)) {\r
+ if (EFI_ERROR (Status) || (Value == NULL)) {\r
DEBUG ((DEBUG_WARN, "Warning: Failed to get the Last Attempt Status from variable. Status = %r\n", Status));\r
return LastAttemptStatus;\r
}\r
Version = DEFAULT_LASTATTEMPT;\r
\r
Status = GetVariable2 (VARNAME_LASTATTEMPTVERSION, &gEfiCallerIdGuid, (VOID **)&Value, &Size);\r
- if (EFI_ERROR (Status)) {\r
+ if (EFI_ERROR (Status) || (Value == NULL)) {\r
DEBUG ((DEBUG_WARN, "Warning: Failed to get the Last Attempt Version from variable. Status = %r\n", Status));\r
return Version;\r
}\r
\r
UEFI Variable accessed: GUID = gEfiCallerIdGuid, Name = L"FmpLsv"\r
\r
- @param[in] LowestSupported The lowest supported version of the firmware image\r
- in the firmware device.\r
+ @param[in] LowestSupportedVersion The lowest supported version of the firmware image\r
+ in the firmware device.\r
\r
**/\r
VOID\r