summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1999-12-30 02:32:13 +0000
committermjacob <mjacob@FreeBSD.org>1999-12-30 02:32:13 +0000
commit48829a5d6b8a2d298f31a3d298c809338e2dfb1a (patch)
treedc625ee612f905a9ec03af3e0fdd860439699f6a /sys/cam/scsi
parent5d6d63f1198ed500d9ba3fd2a94cf49d48763b5a (diff)
downloadFreeBSD-src-48829a5d6b8a2d298f31a3d298c809338e2dfb1a.zip
FreeBSD-src-48829a5d6b8a2d298f31a3d298c809338e2dfb1a.tar.gz
Change error message make sense and add a missing
periph_release on a failed open so that the periph dtor for it will get called when we deallocate the instance from targioctl.
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r--sys/cam/scsi/scsi_target.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index f5f577f..85e45dd 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -296,7 +296,7 @@ targenlun(struct cam_periph *periph)
status = immed_ccb.ccb_h.status;
if (status != CAM_REQ_CMP) {
xpt_print_path(periph->path);
- printf("targenlun - Enable Lun Rejected for status 0x%x\n",
+ printf("targenlun - Enable Lun Rejected with status 0x%x\n",
status);
return (status);
}
@@ -580,6 +580,9 @@ targopen(dev_t dev, int flags, int fmt, struct proc *p)
break;
}
cam_periph_unlock(periph);
+ if (error) {
+ cam_periph_release(periph);
+ }
return (error);
}
OpenPOWER on IntegriCloud