mirror of https://github.com/acidanthera/audk.git
Refine code to make code more safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11123 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8df0bd287c
commit
54790583c0
|
@ -149,7 +149,7 @@ Returns:
|
||||||
// Try to get the PEI version of ReportStatusCode.
|
// Try to get the PEI version of ReportStatusCode.
|
||||||
//
|
//
|
||||||
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
|
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -700,7 +700,7 @@ Returns:
|
||||||
|
|
||||||
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
|
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
|
||||||
}
|
}
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) || (HiiPackageList == NULL)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -958,7 +958,7 @@ ConstructConfigAltResp (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) || (ConfigHdr == NULL)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -930,7 +930,7 @@ Returns:
|
||||||
// Try to get the PEI version of ReportStatusCode.
|
// Try to get the PEI version of ReportStatusCode.
|
||||||
//
|
//
|
||||||
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
|
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue