From 95c61c04c42c14a416261244a85eb39b359b1ecf Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 23 Oct 2023 17:23:20 -0600 Subject: [PATCH] drivers/elog: Remove NULL check for array created in code Checking to see if a the location of a static variable is NULL isn't super useful. If the check ever fails, there are much larger issues. Found-by: Coverity Scan #1452607 Signed-off-by: Martin Roth Change-Id: I6d3e012542287511f61807075c998efd6d10441e Reviewed-on: https://review.coreboot.org/c/coreboot/+/78614 Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/drivers/elog/elog.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 687e68b2f7..ecee145e31 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -761,10 +761,6 @@ int elog_init(void) elog_size = region_device_sz(&elog_state.nv_dev); mirror_buffer = elog_mirror_buf; - if (!mirror_buffer) { - printk(BIOS_ERR, "ELOG: Unable to allocate backing store\n"); - return -1; - } rdev_chain_mem_rw(&elog_state.mirror_dev, mirror_buffer, elog_size); /*