Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/43085a80c883
branches:  nick-nhusb
changeset: 334178:43085a80c883
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Mar 30 11:56:18 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 1d6409797863 -r 43085a80c883 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Mar 29 11:40:36 2015 +0000
+++ b/sys/dev/usb/ohci.c        Mon Mar 30 11:56:18 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.254.2.19 2015/03/19 17:26:43 skrll Exp $    */
+/*     $NetBSD: ohci.c,v 1.254.2.20 2015/03/30 11:56:18 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.2.19 2015/03/19 17:26:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.20 2015/03/30 11:56:18 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1887,8 +1887,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