Skip to content

Commit 34569d8

Browse files
smaeulmiquelraynal
authored andcommitted
mtd: rawnand: sunxi: Fix the size of the last OOB region
The previous code assigned to the wrong structure member. Fixes: c66811e ("mtd: nand: sunxi: switch to mtd_ooblayout_ops") Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-By: Dhruva Gole <d-gole@ti.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-6-samuel@sholland.org
1 parent 85e8177 commit 34569d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/nand/raw/sunxi_nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
16091609
if (section < ecc->steps)
16101610
oobregion->length = 4;
16111611
else
1612-
oobregion->offset = mtd->oobsize - oobregion->offset;
1612+
oobregion->length = mtd->oobsize - oobregion->offset;
16131613

16141614
return 0;
16151615
}

0 commit comments

Comments
 (0)