[coreboot-gerrit] Patch set updated for coreboot: soc/intel/common/lpss_i2c: fix NULL dereference in error path
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Fri Nov 18 16:00:25 CET 2016
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17468
-gerrit
commit 87fffa9a2968ca3d57767a5ef3750ec8fe57f9b8
Author: Aaron Durbin <adurbin at chromium.org>
Date: Fri Nov 18 08:10:35 2016 -0600
soc/intel/common/lpss_i2c: fix NULL dereference in error path
If the SoC clock speed is not supported there is supposed to
be an error printed. However, the value printed was wrong which
was dereferencing a NULL struct. Fix that.
Change-Id: I5021ad8c1581d1935b39875ffa3aa00b594c537a
Found-by: Coverity Scan #1365977
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/soc/intel/common/lpss_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soc/intel/common/lpss_i2c.c b/src/soc/intel/common/lpss_i2c.c
index 49fb85d..11685f9 100644
--- a/src/soc/intel/common/lpss_i2c.c
+++ b/src/soc/intel/common/lpss_i2c.c
@@ -539,7 +539,7 @@ static int lpss_i2c_gen_config_rise_fall_time(struct lpss_i2c_regs *regs,
if (soc == NULL) {
printk(BIOS_ERR, "lpss_i2c: invalid SoC clock speed %d MHz\n",
- soc->clk_speed_mhz);
+ CONFIG_SOC_INTEL_COMMON_LPSS_I2C_CLOCK_MHZ);
return -1;
}
More information about the coreboot-gerrit
mailing list