diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2020-03-09 11:02:26 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-03-11 14:37:28 +0000 |
commit | 840bef061fca0ee40619e43e75ab073e9dab2d0a (patch) | |
tree | c78bec1463499a8e62d52e217efef532b13b3bea /src | |
parent | a53dbd4780b2b19b06756f7c119f8c315fca4a58 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/tigerlake/fsp_params_jsl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/intel/tigerlake/fsp_params_jsl.c b/src/soc/intel/tigerlake/fsp_params_jsl.c index 6cb3b6718d..96aa7ba016 100644 --- a/src/soc/intel/tigerlake/fsp_params_jsl.c +++ b/src/soc/intel/tigerlake/fsp_params_jsl.c @@ -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; |