aboutsummaryrefslogtreecommitdiff
path: root/drivers/sbus/char/jsflash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus/char/jsflash.c')
-rw-r--r--drivers/sbus/char/jsflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index 2132c906e53a..d56ddaa77036 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -189,7 +189,7 @@ static void jsfd_do_request(struct request_queue *q)
while ((req = elv_next_request(q)) != NULL) {
struct jsfd_part *jdp = req->rq_disk->private_data;
unsigned long offset = blk_rq_pos(req) << 9;
- size_t len = blk_rq_cur_sectors(req) << 9;
+ size_t len = blk_rq_cur_bytes(req);
if ((offset + len) > jdp->dsize) {
__blk_end_request_cur(req, -EIO);