summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-11-29 12:18:26 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-12-03 15:28:53 +0000
commit5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c (patch)
treec4280680e2a9bc5281c06bb9ce2d69ea2357f064 /src/lib
parentd14673f0b11c72a6c1493caa25334cbb63a66682 (diff)
lib/imd_cbmem: Eliminate unnecessary NULL check
&imd_cbmem is never NULL, so remove that path Change-Id: Ib9a9c88d6cd4842df447f046bc0abaa7ef5032c7 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37361 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/imd_cbmem.c11
1 files changed, 1 insertions, 10 deletions
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)