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>
This commit is contained in:
Patrick Georgi 2016-04-14 11:53:48 +02:00 committed by Martin Roth
parent 17573035fd
commit 831d65d0ba
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}