summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2020-09-15 16:10:25 +0530
committerSubrata Banik <subrata.banik@intel.com>2020-09-17 09:57:06 +0000
commit7938ebc7d7f1ee8a048b76f24d812a64f1bb5324 (patch)
treeb6397bb431cb61a8dde66feb8bda3b8ddd750ca7 /src/soc/intel
parent754de4da375ef5a23efe9656f0eaf4fa496cb9ee (diff)
soc/intel/common/block/chip: Refactor chip_get_common_soc_structure()
Found-by: Klocwork, Pointer soc_config is used uninitialized. Signed-off-by: Subrata Banik <subrata.banik@intel.com> Change-Id: I7e2aa4ef23a68a2ec2ba9d55cf890a7f81e3e278 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45416 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/chip/chip.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/soc/intel/common/block/chip/chip.c b/src/soc/intel/common/block/chip/chip.c
index 09f2c47c94..f52d242357 100644
--- a/src/soc/intel/common/block/chip/chip.c
+++ b/src/soc/intel/common/block/chip/chip.c
@@ -1,15 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <soc/pci_devs.h>
#include <soc/soc_chip.h>
const struct soc_intel_common_config *chip_get_common_soc_structure(void)
{
- const struct soc_intel_common_config *soc_config;
- const config_t *config;
-
- config = config_of_soc();
- soc_config = &config->common_soc_config;
-
- return soc_config;
+ return &((config_t *)config_of_soc())->common_soc_config;
}