lib: Handle return error code of VbExDisplaySetDimension correctly.
The return value of VbExDisplaySetDimension should be handled as VbError_t,
which means we should print error message when it's not zero.
Also add the return code to debug message.
BRANCH=none
BUG=none
TEST=emerge-nyan coreboot chromeos-bootimage, enter recovery screen.
Not seeing error messages anymore.
Change-Id: Icafdfd933d799e8496fedcf1633339065c6962a3
Reviewed-on: https://chromium-review.googlesource.com/200679
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index 669c4e8..6e0c93a 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -239,11 +239,11 @@
ret = VbExDisplaySetDimension(
image_info.width,
image_info.height);
- if (!ret) {
+ if (ret) {
VBDEBUG(("VbExDisplaySetDimension"
- "(%d,%d): failed.\n",
+ "(%d,%d): failed (%#x).\n",
image_info.width,
- image_info.height));
+ image_info.height, ret));
}
}