From feefbd71270123a4071395acc32878bf6bb10ae2 Mon Sep 17 00:00:00 2001 From: Lijian Zhao Date: Tue, 22 Aug 2017 17:40:00 -0700 Subject: soc/intel/cannonlake: Fix Coverity scan error Add return in case of null pointer to avoid coverity scan error, fixed 1.Coverity ID 1379849: Null pointer dereferences (FORWARD_NULL) 2.Coverity ID 1379848: Null pointer dereferences (FORWARD_NULL) Change-Id: Ica19735307736c8a55c29af88db8b1372f8779e4 Signed-off-by: Lijian Zhao Reviewed-on: https://review.coreboot.org/21155 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Pratikkumar V Prajapati --- src/soc/intel/cannonlake/pmutil.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/cannonlake/pmutil.c b/src/soc/intel/cannonlake/pmutil.c index 455c9692ed..322fe514e9 100644 --- a/src/soc/intel/cannonlake/pmutil.c +++ b/src/soc/intel/cannonlake/pmutil.c @@ -207,6 +207,7 @@ void soc_get_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; -- cgit v1.2.3