summaryrefslogtreecommitdiff
path: root/src/soc/intel/braswell/chip.c
diff options
context:
space:
mode:
authorRavi Sarawadi <ravishankar.sarawadi@intel.com>2015-09-09 14:12:16 -0700
committerMartin Roth <martinroth@google.com>2016-01-28 20:43:22 +0100
commitd077b58c61896c71218a90292bbcd5063c11698f (patch)
tree0d23442914cc3d1bcafae641d101f3683d9c3778 /src/soc/intel/braswell/chip.c
parent9657f3bb097ef5506d66a999118a4157ddadf7d5 (diff)
downloadcoreboot-d077b58c61896c71218a90292bbcd5063c11698f.tar.xz
soc/braswell: Fix issues found during static code analysis
TEST=Build, boot to OS Original-Reviewed-on: https://chromium-review.googlesource.com/299483 Original-Reviewed-by: Aaron Durbin <adurbin@google.com> Change-Id: I738003b8dfff6a5255085d39e378e18d6ad36bcf Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com> Reviewed-on: https://review.coreboot.org/12738 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/intel/braswell/chip.c')
-rw-r--r--src/soc/intel/braswell/chip.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c
index f177a30eb0..57590c2ba9 100644
--- a/src/soc/intel/braswell/chip.c
+++ b/src/soc/intel/braswell/chip.c
@@ -84,7 +84,16 @@ static void enable_dev(device_t dev)
void soc_silicon_init_params(SILICON_INIT_UPD *params)
{
device_t dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
- struct soc_intel_braswell_config *config = dev->chip_info;
+ struct soc_intel_braswell_config *config;
+
+ if (!dev) {
+ printk(BIOS_ERR,
+ "Error! Device (%s) not found, "
+ "soc_silicon_init_params!\n", dev_path(dev));
+ return;
+ }
+
+ config = dev->chip_info;
/* Set the parameters for SiliconInit */
printk(BIOS_DEBUG, "Updating UPD values for SiliconInit\n");