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> Reviewed-on: https://review.coreboot.org/28948 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f7cc469139
commit
834543c0c7
|
@ -290,6 +290,10 @@ static void configure_isst(void)
|
|||
static void configure_misc(void)
|
||||
{
|
||||
struct device *dev = SA_DEV_ROOT;
|
||||
if (!dev) {
|
||||
printk(BIOS_ERR, "SA_DEV_ROOT device not found!\n");
|
||||
return;
|
||||
}
|
||||
config_t *conf = dev->chip_info;
|
||||
msr_t msr;
|
||||
|
||||
|
|
|
@ -83,6 +83,10 @@ void pch_thermal_configuration(void)
|
|||
{
|
||||
uint16_t reg16;
|
||||
struct device *dev = PCH_DEV_THERMAL;
|
||||
if (!dev) {
|
||||
printk(BIOS_ERR, "PCH_DEV_THERMAL device not found!\n");
|
||||
return;
|
||||
}
|
||||
void *thermalbar = pch_thermal_get_bar(dev);
|
||||
|
||||
/* Use default pre-ram bar */
|
||||
|
|
Loading…
Reference in New Issue