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>
This commit is contained in:
Ravi Sarawadi
2015-09-09 14:12:16 -07:00
committed by Martin Roth
parent 9657f3bb09
commit d077b58c61
4 changed files with 25 additions and 10 deletions

View File

@@ -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");