summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Library/HdLcd/HdLcd.c
diff options
context:
space:
mode:
authorGirish Pathak <girish.pathak at arm.com>2017-09-26 21:15:14 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2018-04-23 12:00:30 +0100
commit3da4193bb6269d0b85c129297d2e5ce1be0b3c56 (patch)
treef65f09d6d52bea8a33fe9fb1c21f8bea2e253937 /ArmPlatformPkg/Library/HdLcd/HdLcd.c
parent4257dfaa61b66115c52624ba1547de7bb1124aa0 (diff)
downloadedk2-3da4193bb6269d0b85c129297d2e5ce1be0b3c56.tar.gz
edk2-3da4193bb6269d0b85c129297d2e5ce1be0b3c56.tar.bz2
edk2-3da4193bb6269d0b85c129297d2e5ce1be0b3c56.zip
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>
Diffstat (limited to 'ArmPlatformPkg/Library/HdLcd/HdLcd.c')
-rw-r--r--ArmPlatformPkg/Library/HdLcd/HdLcd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
index be4ccfdc1f..28306c530e 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
@@ -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);