Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37361 )
Change subject: lib/imd_cbmem: Eliminate unnecessary NULL check ......................................................................
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 --- M src/lib/imd_cbmem.c 1 file changed, 1 insertion(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index d7f7d20..4172fa4 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -69,16 +69,7 @@ */ 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)