aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/pmc_mux/mux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel/pmc_mux/mux.c')
-rw-r--r--src/drivers/intel/pmc_mux/mux.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/drivers/intel/pmc_mux/mux.c b/src/drivers/intel/pmc_mux/mux.c
index 29ed1a9603..e2099152a6 100644
--- a/src/drivers/intel/pmc_mux/mux.c
+++ b/src/drivers/intel/pmc_mux/mux.c
@@ -13,8 +13,14 @@ static const char *mux_acpi_name(const struct device *dev)
static void mux_fill_ssdt(const struct device *dev)
{
- acpigen_write_scope(acpi_device_scope(dev));
- acpigen_write_device(acpi_device_name(dev));
+ const char *scope = acpi_device_scope(dev);
+ const char *name = acpi_device_name(dev);
+
+ if (!scope || !name)
+ return;
+
+ acpigen_write_scope(scope);
+ acpigen_write_device(name);
acpigen_write_name_string("_HID", TGL_PMC_MUX_HID);
acpigen_write_name_string("_DDN", dev->chip_ops->name);