summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtd_blkdevs.c
diff options
context:
space:
mode:
authorAbhishek Sahu <absahu@codeaurora.org>2017-08-02 14:33:05 +0200
committerBrian Norris <computersforpeace@gmail.com>2017-08-12 23:53:24 +0200
commit9a51544774a57fcb94994a61860a17f9e63a8d7b (patch)
treec7bf686fa531a1752d3a5b51e9c889872adfd52b /drivers/mtd/mtd_blkdevs.c
parentMerge tag 'nand/fixes-for-4.13-rc4' of git://git.infradead.org/l2-mtd into MTD (diff)
downloadlinux-9a51544774a57fcb94994a61860a17f9e63a8d7b.tar.xz
linux-9a51544774a57fcb94994a61860a17f9e63a8d7b.zip
mtd: blkdevs: Fix mtd block write failure
All the MTD block write requests are failing with following error messages mkfs.ext4 /dev/mtdblock0 print_req_error: I/O error, dev mtdblock0, sector 0 Buffer I/O error on dev mtdblock0, logical block 0, lost async page write The control is going to default case after block write request because of missing return. Fixes: commit 2a842acab109 ("block: introduce new block status code type") Signed-off-by: Abhishek Sahu <absahu@codeaurora.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r--drivers/mtd/mtd_blkdevs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index f336a9b85576..9ec8f033ac5f 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -113,6 +113,7 @@ static blk_status_t do_blktrans_request(struct mtd_blktrans_ops *tr,
for (; nsect > 0; nsect--, block++, buf += tr->blksize)
if (tr->writesect(dev, block, buf))
return BLK_STS_IOERR;
+ return BLK_STS_OK;
default:
return BLK_STS_IOERR;
}