John Zhao has uploaded this change for review.

View Change

mb/google/volteer: Add error handling

Coverity detects missing error handling after calling function
tlcl_lib_init. This change checks the function tlcl_lib_init return
value and handles error properly.

Found-by: Coverity CID 1432491
TEST=None

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ife38b1450451cb25e5479760d640375db153e499
---
M src/mainboard/google/volteer/mainboard.c
1 file changed, 8 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/45176/1
diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c
index 849869a..23c3e92 100644
--- a/src/mainboard/google/volteer/mainboard.c
+++ b/src/mainboard/google/volteer/mainboard.c
@@ -12,6 +12,7 @@
#include <soc/ramstage.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include <variant/gpio.h>
+#include <vb2_api.h>

static void mainboard_init(struct device *dev)
{
@@ -43,7 +44,13 @@

void mainboard_update_soc_chip_config(struct soc_intel_tigerlake_config *cfg)
{
- tlcl_lib_init();
+ int ret;
+ ret = tlcl_lib_init();
+ if (ret != VB2_SUCCESS) {
+ printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", ret);
+ return;
+ }
+
if (cr50_is_long_interrupt_pulse_enabled()) {
printk(BIOS_INFO, "Enabling S0i3.4\n");
} else {

To view, visit change 45176. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ife38b1450451cb25e5479760d640375db153e499
Gerrit-Change-Number: 45176
Gerrit-PatchSet: 1
Gerrit-Owner: John Zhao <john.zhao@intel.com>
Gerrit-MessageType: newchange