A silly buglet found by Coverity- check the return value from

cam_periph_acquire.
This commit is contained in:
Matt Jacob 2007-03-15 06:42:54 +00:00
parent e35180e8ed
commit 00b08b94fe
1 changed files with 7 additions and 1 deletions

View File

@ -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.