diff options
Diffstat (limited to 'drivers/cdrom/gdrom.c')
-rw-r--r-- | drivers/cdrom/gdrom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 1231d95aa695..d6ba77a2dd7b 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -624,14 +624,14 @@ static void gdrom_readdisk_dma(struct work_struct *work) | |||
624 | ctrl_outb(1, GDROM_DMA_STATUS_REG); | 624 | ctrl_outb(1, GDROM_DMA_STATUS_REG); |
625 | wait_event_interruptible_timeout(request_queue, | 625 | wait_event_interruptible_timeout(request_queue, |
626 | gd.transfer == 0, GDROM_DEFAULT_TIMEOUT); | 626 | gd.transfer == 0, GDROM_DEFAULT_TIMEOUT); |
627 | err = gd.transfer; | 627 | err = gd.transfer ? -EIO : 0; |
628 | gd.transfer = 0; | 628 | gd.transfer = 0; |
629 | gd.pending = 0; | 629 | gd.pending = 0; |
630 | /* now seek to take the request spinlock | 630 | /* now seek to take the request spinlock |
631 | * before handling ending the request */ | 631 | * before handling ending the request */ |
632 | spin_lock(&gdrom_lock); | 632 | spin_lock(&gdrom_lock); |
633 | list_del_init(&req->queuelist); | 633 | list_del_init(&req->queuelist); |
634 | end_dequeued_request(req, 1 - err); | 634 | __blk_end_request(req, err, blk_rq_bytes(req)); |
635 | } | 635 | } |
636 | spin_unlock(&gdrom_lock); | 636 | spin_unlock(&gdrom_lock); |
637 | kfree(read_command); | 637 | kfree(read_command); |