summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2010-07-23 20:21:59 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2010-07-23 20:21:59 +0000
commit4f1a72500c438538bed55293f2e724efc28584f0 (patch)
tree9caf05e702ccd09ceb4fac9e6bf3f4ce5ae4cd79 /sys/dev
parent4e8b412bc800198fc97bb999896a53e8e4bf7795 (diff)
Don't initialize acpiec pointer in acpi_softc until registration succeeds
ok deraadt
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpiec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c
index e48f51029bb..abe76b6e466 100644
--- a/sys/dev/acpi/acpiec.c
+++ b/sys/dev/acpi/acpiec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiec.c,v 1.33 2010/07/23 20:19:21 jordan Exp $ */
+/* $OpenBSD: acpiec.c,v 1.34 2010/07/23 20:21:58 jordan Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
*
@@ -263,7 +263,6 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
printf(": Only single EC is supported\n");
return;
}
- sc->sc_acpi->sc_ec = sc;
if (acpiec_getcrs(sc, aa)) {
printf(": Failed to read resource settings\n");
@@ -275,6 +274,7 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
return;
}
+ sc->sc_acpi->sc_ec = sc;
acpiec_get_events(sc);
dnprintf(10, "%s: GPE: %d\n", DEVNAME(sc), sc->sc_gpe);