aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ata/ata_xpt.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2018-02-06 06:42:25 +0000
committerScott Long <scottl@FreeBSD.org>2018-02-06 06:42:25 +0000
commit99e7a4ad9e6fe53868cb15449667ad46814d692b (patch)
treedd1f69f49785e64aaff2cfabbcb463555c431816 /sys/cam/ata/ata_xpt.c
parent87dda4ed5d3d34f339a5a8e1643627c1f28001dc (diff)
downloadsrc-99e7a4ad9e6fe53868cb15449667ad46814d692b.tar.gz
src-99e7a4ad9e6fe53868cb15449667ad46814d692b.zip
Return a C errno for cam_periph_acquire().
There's no compelling reason to return a cam_status type for this function and doing so only creates confusion with normal C coding practices. It's technically an API change, but the periph API isn't widely used. No efffective change to operation. Reviewed by: imp, mav, ken Sponsored by: Netflix Differential Revision: D14063
Notes
Notes: svn path=/head/; revision=328918
Diffstat (limited to 'sys/cam/ata/ata_xpt.c')
-rw-r--r--sys/cam/ata/ata_xpt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 334752efe2c4..c41ab076b122 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -280,7 +280,6 @@ static cam_status
proberegister(struct cam_periph *periph, void *arg)
{
union ccb *request_ccb; /* CCB representing the probe request */
- cam_status status;
probe_softc *softc;
request_ccb = (union ccb *)arg;
@@ -304,10 +303,9 @@ proberegister(struct cam_periph *periph, void *arg)
periph->softc = softc;
softc->periph = periph;
softc->action = PROBE_INVALID;
- status = cam_periph_acquire(periph);
- if (status != CAM_REQ_CMP) {
- return (status);
- }
+ if (cam_periph_acquire(periph) != 0)
+ return (CAM_REQ_CMP_ERR);
+
CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
ata_device_transport(periph->path);
probeschedule(periph);