Skip to content

Commit

Permalink
mtd: rawnand: sunxi: Fix the size of the last OOB region
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Samuel Holland authored and Miquel Raynal committed Jan 2, 2023
1 parent 85e8177 commit 34569d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/sunxi_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 34569d8

Please sign in to comment.