From 831d65d0ba68be630e3c323e24e2be071456a9e8 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 14 Apr 2016 11:53:48 +0200 Subject: intel/apollolake: Fix logic error Testing dev->chip == NULL when dev == NULL doesn't make sense (and gcc thinks that's undefined behavior which should be rewarded with a trap). Change-Id: I801ce3d6b791fdf96b23333432dee394aa2e2ddf Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/14360 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Andrey Petrov --- src/soc/intel/apollolake/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index b8ea04669e..d2a1e0d09f 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -81,7 +81,7 @@ void platform_fsp_silicon_init_params_cb(struct FSPS_UPD *silupd) silconfig->GraphicsConfigPtr = fsp_load_vbt(); struct device *dev = NB_DEV_ROOT; - if (!dev && !dev->chip_info) { + if (!dev || !dev->chip_info) { printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n"); return; } -- cgit v1.2.3