diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/intel/pmc_mux/con/con.c | 11 | ||||
-rw-r--r-- | src/drivers/intel/pmc_mux/mux.c | 10 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/drivers/intel/pmc_mux/con/con.c b/src/drivers/intel/pmc_mux/con/con.c index 08c38e8875..ad95905a9f 100644 --- a/src/drivers/intel/pmc_mux/con/con.c +++ b/src/drivers/intel/pmc_mux/con/con.c @@ -29,13 +29,20 @@ static void con_fill_ssdt(const struct device *dev) { struct drivers_intel_pmc_mux_con_config *config = dev->chip_info; struct acpi_dp *dsd; + const char *scope; + const char *name; if (!dev->enabled) return; /* Reference the existing scope and write CONx device */ - acpigen_write_scope(acpi_device_scope(dev)); - acpigen_write_device(acpi_device_name(dev)); + scope = acpi_device_scope(dev); + name = acpi_device_name(dev); + if (!scope || !name) + return; + + acpigen_write_scope(scope); + acpigen_write_device(name); acpigen_write_name_integer("_ADR", dev->path.generic.id); 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); |