mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS
This change moves some ASSERTs in error handling code to improve efficiency in DEBUG build. This change also removes redundant error code returns. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak <girish.pathak@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
parent
4257dfaa61
commit
3da4193bb6
|
@ -90,8 +90,7 @@ LcdInitialize (
|
|||
@param[in] ModeNumber Display mode number.
|
||||
|
||||
@retval EFI_SUCCESS Display mode set successfully.
|
||||
@retval EFI_DEVICE_ERROR Reurns an error if display timing
|
||||
information is not available.
|
||||
@retval !(EFI_SUCCESS) Other errors.
|
||||
**/
|
||||
EFI_STATUS
|
||||
LcdSetMode (
|
||||
|
@ -122,15 +121,15 @@ LcdSetMode (
|
|||
&VBackPorch,
|
||||
&VFrontPorch
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
BytesPerPixel = GetBytesPerPixel (LcdBpp);
|
||||
|
|
|
@ -75,8 +75,8 @@ LcdInitialize (
|
|||
@param[in] ModeNumbe Display mode number.
|
||||
|
||||
@retval EFI_SUCCESS Display mode set successfuly.
|
||||
@retval EFI_DEVICE_ERROR It returns an error if display timing
|
||||
information is not available.
|
||||
@retval !(EFI_SUCCESS) Other errors.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
LcdSetMode (
|
||||
|
@ -107,15 +107,15 @@ LcdSetMode (
|
|||
&VBackPorch,
|
||||
&VFrontPorch
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
// Disable the CLCD_LcdEn bit
|
||||
|
|
Loading…
Reference in New Issue