summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2019-09-26 08:16:26 +0000
committerbouyer <bouyer@NetBSD.org>2019-09-26 08:16:26 +0000
commit33bb2c4f88818cf236e2caa3a9c62b4ee90aba05 (patch)
tree756e9cb498566aa04f515c0b1f842b542d0db382 /sys
parent63d1a8ab5f021c2026d348561cddba898a10c898 (diff)
Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/ihidev.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c
index 1e095629579..0f2b4ad62a5 100644
--- a/sys/dev/i2c/ihidev.c
+++ b/sys/dev/i2c/ihidev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $ */
+/* $NetBSD: ihidev.c,v 1.8 2019/09/26 08:16:26 bouyer Exp $ */
/* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
/*-
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.8 2019/09/26 08:16:26 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -210,8 +210,10 @@ ihidev_attach(device_t parent, device_t self, void *aux)
sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, IPL_TTY,
false, ihidev_intr, sc, device_xname(self));
- if (sc->sc_ih == NULL)
+ if (sc->sc_ih == NULL) {
aprint_error_dev(self, "can't establish interrupt\n");
+ return;
+ }
aprint_normal_dev(self, "interrupting at %s\n",
acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
}