summaryrefslogtreecommitdiff
path: root/drivers/acpi/tiny-power-button.c
diff options
context:
space:
mode:
authorSimona Vetter <simona.vetter@ffwll.ch>2026-05-28 09:56:06 +0200
committerSimona Vetter <simona.vetter@ffwll.ch>2026-05-28 09:58:36 +0200
commitbed29492d413349e5b13f21936655064cdb63c91 (patch)
tree2fc3af35896e84d868f7945e98f7bfc3d6a72246 /drivers/acpi/tiny-power-button.c
parent3470274dca4887e2b56684bd6a482097318d95a5 (diff)
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d (diff)
Merge v7.1-rc5 into drm-next
Boris Brezillion needs the gem lru fixes 379e8f1ca5e9 ("drm/gem: Make the GEM LRU lock part of drm_device") backmerged for drm-misc-next. That also means we need to sort out the rename conflict in panthor with the fixup patch from Boris from drm-tip. Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch>
Diffstat (limited to 'drivers/acpi/tiny-power-button.c')
-rw-r--r--drivers/acpi/tiny-power-button.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/tiny-power-button.c b/drivers/acpi/tiny-power-button.c
index 531e65b01bcb..92516ef84b02 100644
--- a/drivers/acpi/tiny-power-button.c
+++ b/drivers/acpi/tiny-power-button.c
@@ -38,9 +38,13 @@ static u32 acpi_tiny_power_button_event(void *not_used)
static int acpi_tiny_power_button_probe(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
+ struct acpi_device *device;
acpi_status status;
+ device = ACPI_COMPANION(&pdev->dev);
+ if (!device)
+ return -ENODEV;
+
if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) {
status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
acpi_tiny_power_button_event,