Patch "mtd: rawnand: sunxi: Fix the size of the last OOB region" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-rawnand-sunxi-fix-the-size-of-the-last-oob-regio.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c6210c75e31571d13d616b7a824129cb0c67c60c
Author: Samuel Holland <samuel@xxxxxxxxxxxx>
Date:   Thu Dec 29 12:15:24 2022 -0600

    mtd: rawnand: sunxi: Fix the size of the last OOB region
    
    [ Upstream commit 34569d869532b54d6e360d224a0254dcdd6a1785 ]
    
    The previous code assigned to the wrong structure member.
    
    Fixes: c66811e6d350 ("mtd: nand: sunxi: switch to mtd_ooblayout_ops")
    Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
    Acked-By: Dhruva Gole <d-gole@xxxxxx>
    Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
    Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-6-samuel@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 45c376fc571af..0f3bce3fb00b7 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -1587,7 +1587,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;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux