soc/amd/common/block/espi_util: drop unneeded check in espi_get_config

Since soc_get_common_config will either return a valid pointer or cause
a linking error, this function will also return a valid pointer or cause
a linking error, so no need for additional runtime checks.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I99661247b9f8f47a708e3a6ff3f9e5359b505509
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70739
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held 2022-12-13 19:38:01 +01:00
parent 993092039b
commit c4f5241e66
1 changed files with 0 additions and 4 deletions

View File

@ -374,10 +374,6 @@ enum cb_err espi_open_mmio_window(uint32_t base, size_t size)
static const struct espi_config *espi_get_config(void) static const struct espi_config *espi_get_config(void)
{ {
const struct soc_amd_common_config *soc_cfg = soc_get_common_config(); const struct soc_amd_common_config *soc_cfg = soc_get_common_config();
if (!soc_cfg)
die("Common config structure is NULL!\n");
return &soc_cfg->espi_config; return &soc_cfg->espi_config;
} }