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@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 */