Skip to content

Commit

Permalink
mtd: blkdevs: Fix mtd block write failure
Browse files Browse the repository at this point in the history
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 2a842ac ("block: introduce new block status code type")
Signed-off-by: Abhishek Sahu <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
  • Loading branch information
Abhishek Sahu authored and computersforpeace committed Aug 12, 2017
1 parent 3398367 commit 9a51544
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9a51544

Please sign in to comment.