Skip to content

Commit a7c17d8

Browse files
ahunter6storulf
authored andcommitted
mmc: block: Fix block status codes
Commit 2a842ac ("block: introduce new block status code type") changed the error type but not in patches merged through the mmc tree, like commit 0493f6f ("mmc: block: Move boot partition locking into a driver op"). Fix one error code that is incorrect and also use BLK_STS_OK in preference to 0. Fixes: 17ece34 ("Merge tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc") Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent cc4a41f commit a7c17d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mmc/core/block.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req)
12131213
break;
12141214
}
12151215
mq_rq->drv_op_result = ret;
1216-
blk_end_request_all(req, ret);
1216+
blk_end_request_all(req, ret ? BLK_STS_IOERR : BLK_STS_OK);
12171217
}
12181218

12191219
static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
@@ -1718,9 +1718,9 @@ static bool mmc_blk_rw_cmd_err(struct mmc_blk_data *md, struct mmc_card *card,
17181718
if (err)
17191719
req_pending = old_req_pending;
17201720
else
1721-
req_pending = blk_end_request(req, 0, blocks << 9);
1721+
req_pending = blk_end_request(req, BLK_STS_OK, blocks << 9);
17221722
} else {
1723-
req_pending = blk_end_request(req, 0, brq->data.bytes_xfered);
1723+
req_pending = blk_end_request(req, BLK_STS_OK, brq->data.bytes_xfered);
17241724
}
17251725
return req_pending;
17261726
}

0 commit comments

Comments
 (0)