From: kettenis Date: Tue, 11 Sep 2018 20:25:58 +0000 (+0000) Subject: Only look for acpi tables if acpi(4) attached. Fixes radeondrm(4) crash X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5d86800792769ec5d83762281226075ecd342426;p=openbsd Only look for acpi tables if acpi(4) attached. Fixes radeondrm(4) crash on arm64 when using a device tree. --- 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;