cam_periph_acquire() now returns an errno.

The ch(4) driver was missed in change 328918, which changed
cam_periph_acquire() to return an errno instead of cam_status.

As a result, ch(4) failed to attach.

Sponsored by:	Spectra Logic
This commit is contained in:
ken 2018-03-19 20:19:00 +00:00
parent 3809903c0e
commit fddccc44e2

View File

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