Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Abort attach if acpi_intr_establish() fails. Fro...
details: https://anonhg.NetBSD.org/src/rev/91b38874fca7
branches: trunk
changeset: 454723:91b38874fca7
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Sep 26 08:16:26 2019 +0000
description:
Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.
diffstat:
sys/dev/i2c/ihidev.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 640eeedb1519 -r 91b38874fca7 sys/dev/i2c/ihidev.c
--- a/sys/dev/i2c/ihidev.c Thu Sep 26 08:02:28 2019 +0000
+++ b/sys/dev/i2c/ihidev.c Thu Sep 26 08:16:26 2019 +0000
@@ -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 @@
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)));
}
Home |
Main Index |
Thread Index |
Old Index