[coreboot-gerrit] Change in coreboot[master]: soc/intel/skylake: Fix ‘dev’ pointer NULL before being dereferenced
Subrata Banik (Code Review)
gerrit at coreboot.org
Sat Oct 6 11:01:40 CEST 2018
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/28948
Change subject: soc/intel/skylake: Fix ‘dev’ pointer NULL before being dereferenced
......................................................................
soc/intel/skylake: Fix ‘dev’ pointer NULL before being dereferenced
This patch fixes KW issue due to pointer being NULL and will be dereferenced
Change-Id: Iedb59daf5f448e31c0097873a086e4d08cd4a979
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/skylake/cpu.c
M src/soc/intel/skylake/thermal.c
2 files changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/28948/1
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 3733fe0..2adbc26 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -290,6 +290,8 @@
static void configure_misc(void)
{
struct device *dev = SA_DEV_ROOT;
+ if (!dev)
+ return;
config_t *conf = dev->chip_info;
msr_t msr;
diff --git a/src/soc/intel/skylake/thermal.c b/src/soc/intel/skylake/thermal.c
index 01a4f26..aeeebe1 100644
--- a/src/soc/intel/skylake/thermal.c
+++ b/src/soc/intel/skylake/thermal.c
@@ -83,6 +83,8 @@
{
uint16_t reg16;
struct device *dev = PCH_DEV_THERMAL;
+ if (!dev)
+ return;
void *thermalbar = pch_thermal_get_bar(dev);
/* Use default pre-ram bar */
--
To view, visit https://review.coreboot.org/28948
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedb59daf5f448e31c0097873a086e4d08cd4a979
Gerrit-Change-Number: 28948
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181006/6d04b5cd/attachment.html>
More information about the coreboot-gerrit
mailing list