From 5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 29 Nov 2019 12:18:26 +0100 Subject: lib/imd_cbmem: Eliminate unnecessary NULL check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit &imd_cbmem is never NULL, so remove that path Change-Id: Ib9a9c88d6cd4842df447f046bc0abaa7ef5032c7 Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/c/coreboot/+/37361 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/lib/imd_cbmem.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/lib/imd_cbmem.c') diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index d7f7d20f25..4172fa4911 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -69,16 +69,7 @@ static inline const struct imd_entry *cbmem_to_imd(const struct cbmem_entry *e) */ static struct imd *imd_init_backing(struct imd *backing) { - struct imd *imd; - - imd = &imd_cbmem; - - if (imd != NULL) - return imd; - - imd = backing; - - return imd; + return &imd_cbmem; } static struct imd *imd_init_backing_with_recover(struct imd *backing) -- cgit v1.2.3