Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a515447 authored by Abhishek Sahu's avatar Abhishek Sahu Committed by Brian Norris
Browse files

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 2a842aca ("block: introduce new block status code type")
Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 33983675
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}