summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-08-29 10:53:53 +0000
committermav <mav@FreeBSD.org>2015-08-29 10:53:53 +0000
commit25e0f050921b69173ed29ea1e7c20a4a3fa99a1c (patch)
tree1e5dd8656e20abf8ea9cd0058224a45551f6c549 /sys/cam
parent73d1933c36a5329d77158dbc124a76eada079bf3 (diff)
downloadFreeBSD-src-25e0f050921b69173ed29ea1e7c20a4a3fa99a1c.zip
FreeBSD-src-25e0f050921b69173ed29ea1e7c20a4a3fa99a1c.tar.gz
MFC r287025: Remove some code duplication by using biofinish().
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 925dba9..ed8eb4d 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1535,9 +1535,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
} else {
/* This can happen if DMA was disabled. */
bioq_remove(&softc->trim_queue, bp);
- bp->bio_error = EOPNOTSUPP;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EOPNOTSUPP);
xpt_release_ccb(start_ccb);
adaschedule(periph);
return;
@@ -1602,9 +1600,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
}
}
if (fail) {
- bp->bio_error = EIO;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EIO);
xpt_release_ccb(start_ccb);
adaschedule(periph);
return;
OpenPOWER on IntegriCloud