From 5d86800792769ec5d83762281226075ecd342426 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 11 Sep 2018 20:25:58 +0000 Subject: [PATCH] Only look for acpi tables if acpi(4) attached. Fixes radeondrm(4) crash on arm64 when using a device tree. --- sys/dev/pci/drm/drm_linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index f71aab59c23..635cf7fa008 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.31 2018/08/25 18:42:43 kettenis Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.32 2018/09/11 20:25:58 kettenis Exp $ */ /* * Copyright (c) 2013 Jonathan Gray * Copyright (c) 2015, 2016 Mark Kettenis @@ -747,6 +747,9 @@ acpi_get_table_with_size(const char *sig, int instance, KASSERT(instance == 1); + if (sc == NULL) + return AE_NOT_FOUND; + SIMPLEQ_FOREACH(entry, &sc->sc_tables, q_next) { if (memcmp(entry->q_table, sig, strlen(sig)) == 0) { *hdr = entry->q_table; -- 2.20.1