aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cp
diff options
context:
space:
mode:
authorRoman Kurakin <rik@FreeBSD.org>2005-07-09 14:03:02 +0000
committerRoman Kurakin <rik@FreeBSD.org>2005-07-09 14:03:02 +0000
commitde66928b864d47d8aa5358b45f3c3f457578f10f (patch)
tree62d2350480485b6065e4bc5a8b1b15c00bc4db76 /sys/dev/cp
parent045f25a28dd45c81ed12171f8bd1c043c85a1f99 (diff)
downloadsrc-de66928b864d47d8aa5358b45f3c3f457578f10f.tar.gz
src-de66928b864d47d8aa5358b45f3c3f457578f10f.zip
Protect from partially initialized channels.
Approved by: re (scottl)
Notes
Notes: svn path=/head/; revision=147858
Diffstat (limited to 'sys/dev/cp')
-rw-r--r--sys/dev/cp/if_cp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index 79131ad4695c..bd18f2561f52 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -326,6 +326,8 @@ static void cp_intr (void *arg)
for (i = 0; i < NCHAN && b->chan[i].type; i++) {
drv_t *d = b->chan[i].sys;
struct mbuf *m;
+ if (!d || !d->running)
+ continue;
while (_IF_QLEN(&d->queue)) {
IF_DEQUEUE (&d->queue,m);
if (!m)