soc/intel/tigerlake: Fix stale device pointer usage

TEST=Build the mainboard.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I43cccd32589d75a9b0c7e60f8c82b19bbe6b69a7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
This commit is contained in:
Karthikeyan Ramasubramanian 2020-03-09 11:02:26 -06:00 committed by Patrick Georgi
parent a53dbd4780
commit 840bef061f
1 changed files with 5 additions and 1 deletions

View File

@ -143,7 +143,11 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
}
/* SDCard related configuration */
params->ScsSdCardEnabled = pcidev_path_on_root(PCH_DEVFN_SDCARD) ? dev->enabled : 0;
dev = pcidev_path_on_root(PCH_DEVFN_SDCARD);
if (!dev)
params->ScsSdCardEnabled = 0;
else
params->ScsSdCardEnabled = dev->enabled;
params->Device4Enable = config->Device4Enable;