aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/ub.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 08e909dc7944..c6179d6ac6e4 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -808,16 +808,16 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
808 808
809static void ub_end_rq(struct request *rq, unsigned int scsi_status) 809static void ub_end_rq(struct request *rq, unsigned int scsi_status)
810{ 810{
811 int uptodate; 811 int error;
812 812
813 if (scsi_status == 0) { 813 if (scsi_status == 0) {
814 uptodate = 1; 814 error = 0;
815 } else { 815 } else {
816 uptodate = 0; 816 error = -EIO;
817 rq->errors = scsi_status; 817 rq->errors = scsi_status;
818 } 818 }
819 end_that_request_first(rq, uptodate, rq->hard_nr_sectors); 819 if (__blk_end_request(rq, error, blk_rq_bytes(rq)))
820 end_that_request_last(rq, uptodate); 820 BUG();
821} 821}
822 822
823static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, 823static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,