diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-09-11 20:25:59 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-09-11 20:25:59 +0000 |
commit | e47732537e78617b538770c90f093478fd81dfae (patch) | |
tree | f435f39f7e82a1d2afaef5442d5c17de9a0be5e9 /sys/dev | |
parent | 100560a32023f62c485abefa890a1aeb6513dc43 (diff) |
Only look for acpi tables if acpi(4) attached. Fixes radeondrm(4) crash
on arm64 when using a device tree.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -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; |