From ec1a24ca02221daeef521ccc8d934a7e0abb7ae5 Mon Sep 17 00:00:00 2001 From: Shaunak Saha Date: Fri, 6 Oct 2017 12:50:38 -0700 Subject: [PATCH] src/soc/skylake: Fix Null pointer dereferences Fix bug detected by coverity to handle the NULL pointer dereference Coverity Issues: * 1379849 * 1379848 TEST=Build and run on skylake platform Change-Id: Iec7a88a03531bbfeb72cedab5ad93d3a4c23eef5 Signed-off-by: Shaunak Saha Reviewed-on: https://review.coreboot.org/21909 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/intel/skylake/pmutil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c index 4cb4a20cca..19370e1b4d 100644 --- a/src/soc/intel/skylake/pmutil.c +++ b/src/soc/intel/skylake/pmutil.c @@ -216,6 +216,7 @@ void soc_get_gpi_gpe_configs(uint8_t *dw0, uint8_t *dw1, uint8_t *dw2) DEVTREE_CONST struct device *dev = dev_find_slot(0, PCH_DEVFN_PMC); if (!dev || !dev->chip_info) { printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n"); + return; } config = dev->chip_info;