struct gendisk *bd_disk, struct sg_io_hdr *hdr)
{
unsigned long start_time;
- int reading, writing, ret;
+ int reading, writing, ret = 0;
struct request *rq;
struct bio *bio;
char sense[SCSI_SENSE_BUFFERSIZE];
reading = 1;
break;
}
- }
rq = blk_get_request(q, writing ? WRITE : READ, GFP_KERNEL);
if (!rq)
hdr->sb_len_wr = len;
}
- if (blk_rq_unmap_user(rq, bio, hdr->dxfer_len))
+ if (blk_rq_unmap_user(bio, hdr->dxfer_len))
ret = -EFAULT;
/* may not have succeeded, but output values written to control