Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb add KASSERT to make sure softints are not NULL
details: https://anonhg.NetBSD.org/src/rev/55e0f9ce79be
branches: trunk
changeset: 789784:55e0f9ce79be
user: matt <matt%NetBSD.org@localhost>
date: Sat Sep 07 19:53:24 2013 +0000
description:
add KASSERT to make sure softints are not NULL
diffstat:
sys/dev/usb/ehci.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r a5995e773b7c -r 55e0f9ce79be sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Sat Sep 07 19:48:57 2013 +0000
+++ b/sys/dev/usb/ehci.c Sat Sep 07 19:53:24 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.210 2013/09/07 16:43:48 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.211 2013/09/07 19:53:24 matt Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.210 2013/09/07 16:43:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.211 2013/09/07 19:53:24 matt Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -358,8 +358,10 @@
sc->sc_doorbell_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
ehci_doorbell, sc);
+ KASSERT(sc->sc_doorbell_si != NULL);
sc->sc_pcd_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
ehci_pcd, sc);
+ KASSERT(sc->sc_pcd_si != NULL);
sc->sc_offs = EREAD1(sc, EHCI_CAPLENGTH);
@@ -653,6 +655,7 @@
if (eintrs & EHCI_STS_IAA) {
DPRINTF(("ehci_intr1: door bell\n"));
kpreempt_disable();
+ KASSERT(sc->sc_doorbell_si != NULL);
softint_schedule(sc->sc_doorbell_si);
kpreempt_enable();
eintrs &= ~EHCI_STS_IAA;
@@ -671,6 +674,7 @@
}
if (eintrs & EHCI_STS_PCD) {
kpreempt_disable();
+ KASSERT(sc->sc_pcd_si != NULL);
softint_schedule(sc->sc_pcd_si);
kpreempt_enable();
eintrs &= ~EHCI_STS_PCD;
Home |
Main Index |
Thread Index |
Old Index