--- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -711,7 +711,8 @@ static inline struct acpi_device *acpi_d static inline void acpi_dev_put(struct acpi_device *adev) { - put_device(&adev->dev); + if (adev) + put_device(&adev->dev); } #else /* CONFIG_ACPI */