Commit 34569d86 authored by Samuel Holland's avatar Samuel Holland Committed by Miquel Raynal

mtd: rawnand: sunxi: Fix the size of the last OOB region

The previous code assigned to the wrong structure member.

Fixes: c66811e6 ("mtd: nand: sunxi: switch to mtd_ooblayout_ops")
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Acked-By: default avatarDhruva Gole <d-gole@ti.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-6-samuel@sholland.org
parent 85e8177e
......@@ -1609,7 +1609,7 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
if (section < ecc->steps)
oobregion->length = 4;
else
oobregion->offset = mtd->oobsize - oobregion->offset;
oobregion->length = mtd->oobsize - oobregion->offset;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment