diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index e82ff24a02dd..b84849f2e0de 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -419,7 +419,7 @@ chregister(struct cam_periph *periph, void *arg) * instance for it. We'll release this reference once the devfs * instance has been freed. */ - if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + if (cam_periph_acquire(periph) != 0) { xpt_print(periph->path, "%s: lost periph during " "registration!\n", __func__); cam_periph_lock(periph); @@ -467,7 +467,7 @@ chopen(struct cdev *dev, int flags, int fmt, struct thread *td) int error; periph = (struct cam_periph *)dev->si_drv1; - if (cam_periph_acquire(periph) != CAM_REQ_CMP) + if (cam_periph_acquire(periph) != 0) return (ENXIO); softc = (struct ch_softc *)periph->softc;