summaryrefslogtreecommitdiffstats
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/picasso/root_complex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c
index 036ff00ccbab..1c069282af0b 100644
--- a/src/soc/amd/picasso/root_complex.c
+++ b/src/soc/amd/picasso/root_complex.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpigen.h>
+#include <assert.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/amd/msr.h>
@@ -134,14 +135,13 @@ static void read_resources(struct device *dev)
static void root_complex_fill_ssdt(const struct device *device)
{
msr_t msr;
+ const char *scope;
- if (!device) {
- printk(BIOS_ERR, "%s: device is NULL! ACPI SSDT will be incomplete.\n",
- __func__);
- return;
- }
+ assert(device);
- acpigen_write_scope(acpi_device_scope(device));
+ scope = acpi_device_scope(device);
+ assert(scope);
+ acpigen_write_scope(scope);
msr = rdmsr(TOP_MEM);
acpigen_write_name_dword("TOM1", msr.lo);