summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-04-14 11:53:48 +0200
committerMartin Roth <martinroth@google.com>2016-04-15 16:26:39 +0200
commit831d65d0ba68be630e3c323e24e2be071456a9e8 (patch)
tree894d8292f0c8971cab51d9597f6db5328a7d8c4b /src/soc/intel/apollolake
parent17573035fd6832499a63523d4cd4f70a817a1460 (diff)
downloadcoreboot-831d65d0ba68be630e3c323e24e2be071456a9e8.tar.xz
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 <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14360 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r--src/soc/intel/apollolake/chip.c2
1 files changed, 1 insertions, 1 deletions
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;
}