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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45176 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Caveh Jalali <caveh@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
d944f1797f
commit
623da4bc5d
@ -12,6 +12,7 @@
|
|||||||
#include <soc/ramstage.h>
|
#include <soc/ramstage.h>
|
||||||
#include <vendorcode/google/chromeos/chromeos.h>
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
#include <variant/gpio.h>
|
#include <variant/gpio.h>
|
||||||
|
#include <vb2_api.h>
|
||||||
|
|
||||||
static void mainboard_init(struct device *dev)
|
static void mainboard_init(struct device *dev)
|
||||||
{
|
{
|
||||||
@ -43,7 +44,13 @@ static void mainboard_enable(struct device *dev)
|
|||||||
|
|
||||||
void mainboard_update_soc_chip_config(struct soc_intel_tigerlake_config *cfg)
|
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()) {
|
if (cr50_is_long_interrupt_pulse_enabled()) {
|
||||||
printk(BIOS_INFO, "Enabling S0i3.4\n");
|
printk(BIOS_INFO, "Enabling S0i3.4\n");
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user