From 2cb4b68cb5e0e39ff1cbec73cfdc4a92a3ef4af1 Mon Sep 17 00:00:00 2001 From: cognet Date: Fri, 20 Feb 2004 20:36:55 +0000 Subject: Do not test if pDCB is not NULL, we dereference it before anyway, and it should not happen. Add a KASSERT instead. Reported by: Ted Unangst Spotted out by: cperciva --- sys/dev/trm/trm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/trm') diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index 42aa101..00a507f 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -1334,11 +1334,10 @@ void *vpACB; if (scsi_intstatus & (INT_BUSSERVICE | INT_CMDDONE)) { pDCB = pACB->pActiveDCB; + KASSERT(pDCB != NULL, ("no active DCB")); pSRB = pDCB->pActiveSRB; - if (pDCB) { - if (pDCB->DCBFlag & ABORT_DEV_) + if (pDCB->DCBFlag & ABORT_DEV_) trm_EnableMsgOutAbort1(pACB, pSRB); - } phase = (u_int16_t) pSRB->ScsiPhase; /* phase: */ stateV = (void *) trm_SCSI_phase0[phase]; stateV(pACB, pSRB, &scsi_status); -- cgit v1.1