summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index 8ada939138..fb9f7f198f 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -125,12 +125,13 @@ struct chip_operations drivers_usb_acpi_ops = {
bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld)
{
- struct drivers_usb_acpi_config *config = usb_device->chip_info;
+ struct drivers_usb_acpi_config *config;
if (!usb_device || !usb_device->chip_info ||
usb_device->chip_ops != &drivers_usb_acpi_ops)
return false;
+ config = usb_device->chip_info;
if (config->use_custom_pld)
*pld = config->custom_pld;
else