diff options
author | Patrick Georgi <pgeorgi@google.com> | 2019-11-29 12:18:26 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-03 15:28:53 +0000 |
commit | 5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c (patch) | |
tree | c4280680e2a9bc5281c06bb9ce2d69ea2357f064 | |
parent | d14673f0b11c72a6c1493caa25334cbb63a66682 (diff) | |
download | coreboot-5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c.tar.gz coreboot-5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c.tar.bz2 coreboot-5e4c663a5a0fd63164202f98ebcc525f5d8b1d1c.zip |
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>
-rw-r--r-- | src/lib/imd_cbmem.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index d7f7d20f25ec..4172fa4911b8 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) |