Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32322
Change subject: soc/intel/cannonlake: Add null refrence check for Cnvi ......................................................................
soc/intel/cannonlake: Add null refrence check for Cnvi
Change-Id: I2e1011d9ac93ed764b6c2aa425928a972ec2aa43 Signed-off-by: Aamir Bohra aamir.bohra@intel.com --- M src/soc/intel/cannonlake/fsp_params.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/32322/1
diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c index 2688557..994b31c 100644 --- a/src/soc/intel/cannonlake/fsp_params.c +++ b/src/soc/intel/cannonlake/fsp_params.c @@ -254,11 +254,13 @@
/* Enable CNVi Wifi if enabled in device tree */ dev = dev_find_slot(0, PCH_DEVFN_CNViWIFI); + if(dev) { #if IS_ENABLED(CONFIG_SOC_INTEL_COMETLAKE) - params->CnviMode = dev->enabled; + params->CnviMode = dev->enabled; #else - params->PchCnviMode = dev->enabled; + params->PchCnviMode = dev->enabled; #endif + } /* PCI Express */ for (i = 0; i < ARRAY_SIZE(config->PcieClkSrcUsage); i++) { if (config->PcieClkSrcUsage[i] == 0)