aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 354c91d06a6d..310e497b5838 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1207,9 +1207,13 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
1207end_request: 1207end_request:
1208 if (blk_pc_request(rq)) { 1208 if (blk_pc_request(rq)) {
1209 unsigned long flags; 1209 unsigned long flags;
1210 unsigned int dlen = rq->data_len;
1211
1212 if (dma)
1213 rq->data_len = 0;
1210 1214
1211 spin_lock_irqsave(&ide_lock, flags); 1215 spin_lock_irqsave(&ide_lock, flags);
1212 if (__blk_end_request(rq, 0, rq->data_len)) 1216 if (__blk_end_request(rq, 0, dlen))
1213 BUG(); 1217 BUG();
1214 HWGROUP(drive)->rq = NULL; 1218 HWGROUP(drive)->rq = NULL;
1215 spin_unlock_irqrestore(&ide_lock, flags); 1219 spin_unlock_irqrestore(&ide_lock, flags);