Module Name: src
Committed By: skrll
Date: Mon Mar 30 11:56:18 UTC 2015
Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c
Log Message:
Replace an if () panic with KASSERT
To generate a diff of this commit:
cvs rdiff -u -r1.254.2.19 -r1.254.2.20 src/sys/dev/usb/ohci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.19 src/sys/dev/usb/ohci.c:1.254.2.20
--- src/sys/dev/usb/ohci.c:1.254.2.19 Thu Mar 19 17:26:43 2015
+++ src/sys/dev/usb/ohci.c Mon Mar 30 11:56:18 2015
@@ -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 @@ ohci_rem_ed(ohci_softc_t *sc, ohci_soft_
/* 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);