summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorLijian Zhao <lijian.zhao@intel.com>2017-08-22 17:40:00 -0700
committerAaron Durbin <adurbin@chromium.org>2017-08-29 16:23:36 +0000
commitfeefbd71270123a4071395acc32878bf6bb10ae2 (patch)
tree21dc574411492269f01454ffb5c3ac8f45412128 /src/soc/intel
parente013df9a6701198de71cd65ab62343fc187c8219 (diff)
downloadcoreboot-feefbd71270123a4071395acc32878bf6bb10ae2.tar.xz
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 <lijian.zhao@intel.com> Reviewed-on: https://review.coreboot.org/21155 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/cannonlake/pmutil.c1
1 files changed, 1 insertions, 0 deletions
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;