summaryrefslogtreecommitdiffstats
path: root/sys/dev/ida/ida.c
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2005-04-13 17:36:18 +0000
committermdodd <mdodd@FreeBSD.org>2005-04-13 17:36:18 +0000
commit064ba2accd4a905f59182d06ebe707b9da9c1c08 (patch)
treef3b3fdb09885b3862868cbbba3dabb25a37754bb /sys/dev/ida/ida.c
parentad7308e5dc9d3077778b2b0b514b0d86a34fd41c (diff)
downloadFreeBSD-src-064ba2accd4a905f59182d06ebe707b9da9c1c08.zip
FreeBSD-src-064ba2accd4a905f59182d06ebe707b9da9c1c08.tar.gz
Add KASSERT() to warn against NULL deref.
Submitted by: sam (Coverity)
Diffstat (limited to 'sys/dev/ida/ida.c')
-rw-r--r--sys/dev/ida/ida.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index 010dbfd..bfb2c03 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -579,6 +579,7 @@ ida_done(struct ida_softc *ida, struct ida_qcb *qcb)
if (ida->flags & IDA_INTERRUPTS)
wakeup(qcb);
} else {
+ KASSERT(qcb->buf != NULL, ("ida_done(): qcb->buf is NULL!"));
if (error)
qcb->buf->bio_flags |= BIO_ERROR;
idad_intr(qcb->buf);
OpenPOWER on IntegriCloud