Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Replace an if () panic with KASSERT



details:   https://anonhg.NetBSD.org/src/rev/7cbe623f97ac
branches:  trunk
changeset: 807161:7cbe623f97ac
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Mar 30 11:54:43 2015 +0000

description:
Replace an if () panic with KASSERT

diffstat:

 sys/dev/usb/ohci.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 1ecd0934382b -r 7cbe623f97ac sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Mon Mar 30 11:01:53 2015 +0000
+++ b/sys/dev/usb/ohci.c        Mon Mar 30 11:54:43 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.254 2014/11/21 09:40:10 ozaki-r Exp $       */
+/*     $NetBSD: ohci.c,v 1.255 2015/03/30 11:54:43 skrll Exp $ */
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254 2014/11/21 09:40:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.255 2015/03/30 11:54:43 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1872,8 +1872,8 @@
        /* XXX */
        for (p = head; p != NULL && p->next != sed; p = p->next)
                ;
-       if (p == NULL)
-               panic("ohci_rem_ed: ED not found");
+       KASSERT(p != NULL);
+
        usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_nexted),
            sizeof(sed->ed.ed_nexted),
            BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);



Home | Main Index | Thread Index | Old Index