summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_xpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/scsi/scsi_xpt.c')
-rw-r--r--sys/cam/scsi/scsi_xpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 9269f36..609742b 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -1881,8 +1881,8 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
if ((work_ccb->cpi.hba_inquiry &
(PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE)) &&
!(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) &&
- !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) {
- reset_ccb = xpt_alloc_ccb_nowait();
+ !timevalisset(&request_ccb->ccb_h.path->bus->last_reset) &&
+ (reset_ccb = xpt_alloc_ccb_nowait()) != NULL) {
xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path,
CAM_PRIORITY_NONE);
reset_ccb->ccb_h.func_code = XPT_RESET_BUS;
OpenPOWER on IntegriCloud