soc/intel/common: Make read_pmc_lpm_requirements more clear

Commit 2eb100dd12 added PMC LPM requirements to the the PEP ACPI
objects, but it was not made clear that one of the pointer arguments to
the mentioned function is not supposed to be NULL and Coverity
complained. Make the intention clear by instead asserting that `info`
cannot be NULL.

Fixes: Coverity CID 1462119

Change-Id: I9e8862a100d92f4a7ed1826d3970a5110b47f4c4
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c
index b8e7e0d..fe38a36 100644
--- a/src/soc/intel/common/block/acpi/pep.c
+++ b/src/soc/intel/common/block/acpi/pep.c
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <acpi/acpigen.h>
+#include <assert.h>
 #include <console/console.h>
 #include <intelblocks/acpi.h>
 #include <intelblocks/pmc_ipc.h>
@@ -27,6 +28,8 @@
 static void read_pmc_lpm_requirements(const struct soc_pmc_lpm *lpm,
 				      struct reg_info *info)
 {
+	assert(info);
+
 	if (!CONFIG(SOC_INTEL_COMMON_BLOCK_ACPI_PEP_LPM_REQ) || !lpm) {
 		memset(info, 0, sizeof(*info));
 		return;
@@ -61,10 +64,8 @@
 		}
 	}
 
-	if (info) {
-		info->addr = (uint8_t *)reg;
-		info->buffer_size = register_count * sizeof(uint32_t);
-	}
+	info->addr = (uint8_t *)reg;
+	info->buffer_size = register_count * sizeof(uint32_t);
 }
 
 /*