From c4f5241e66ef245cd8061972dd83716b351fd972 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 13 Dec 2022 19:38:01 +0100 Subject: 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 Change-Id: I99661247b9f8f47a708e3a6ff3f9e5359b505509 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70739 Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Varshit Pandya Reviewed-by: Fred Reitberger --- src/soc/amd/common/block/lpc/espi_util.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/soc/amd/common/block') diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c index 0cd35e5ed8..c0f2354f4f 100644 --- a/src/soc/amd/common/block/lpc/espi_util.c +++ b/src/soc/amd/common/block/lpc/espi_util.c @@ -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) { 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; } -- cgit v1.2.3