summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorhe <he@NetBSD.org>2003-11-29 16:17:31 +0000
committerhe <he@NetBSD.org>2003-11-29 16:17:31 +0000
commitfc44e8511ec415ccb8abce244c02e364aaa150f7 (patch)
tree7c9f840175a661a86cf08e648a22d9ac752970a2 /sys/dev/ic
parentae0ead8db3016e3acc148c58654a5830a38810ae (diff)
Patterned after the rest of the code, add one more check that
chp->wdc is non-null before de-referencing it.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wdc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 89319d2a474..243eaaa82c1 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.157 2003/11/27 23:02:40 fvdl Exp $ */
+/* $NetBSD: wdc.c,v 1.158 2003/11/29 16:17:31 he Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.157 2003/11/27 23:02:40 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.158 2003/11/29 16:17:31 he Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -730,7 +730,7 @@ __wdcprobe(chp, poll)
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
delay(10); /* 400ns delay */
/* ACK interrupt in case there is one pending left (Promise ATA100) */
- if (chp->wdc->cap & WDC_CAPABILITY_IRQACK)
+ if (chp->wdc && (chp->wdc->cap & WDC_CAPABILITY_IRQACK))
chp->wdc->irqack(chp);
splx(s);