diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-03-15 06:42:54 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-03-15 06:42:54 +0000 |
commit | 96df9fb668f0d0268057fbf266b7da8c3bd4584b (patch) | |
tree | 317809bddc5a452ab098cb2a466ff4b4bb6ce1f8 /sys/cam | |
parent | 553b57167e3946fc9f560b133e3723e6239aa03e (diff) | |
download | FreeBSD-src-96df9fb668f0d0268057fbf266b7da8c3bd4584b.zip FreeBSD-src-96df9fb668f0d0268057fbf266b7da8c3bd4584b.tar.gz |
A silly buglet found by Coverity- check the return value from
cam_periph_acquire.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ba6eefb..c123b5c 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -5653,6 +5653,7 @@ 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; @@ -5679,7 +5680,12 @@ proberegister(struct cam_periph *periph, void *arg) periph_links.tqe); softc->flags = 0; periph->softc = softc; - cam_periph_acquire(periph); + status = cam_periph_acquire(periph); + if (status != CAM_REQ_CMP) { + return (status); + } + + /* * Ensure we've waited at least a bus settle * delay before attempting to probe the device. |