aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index ef752b248c4d..d4549092400c 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -729,6 +729,8 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
729 return k; /* probably out of space --> ENOMEM */ 729 return k; /* probably out of space --> ENOMEM */
730 } 730 }
731 if (sdp->detached) { 731 if (sdp->detached) {
732 if (srp->bio)
733 blk_end_request_all(srp->rq, -EIO);
732 sg_finish_rem_req(srp); 734 sg_finish_rem_req(srp);
733 return -ENODEV; 735 return -ENODEV;
734 } 736 }