From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2991847E for ; Fri, 10 Mar 2023 13:48:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68257C433D2; Fri, 10 Mar 2023 13:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678456109; bh=fQcbWdZlEAn3dN/zGjeT/fwx29F+MX4mQ9DIN4r9IMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wPhhGt+4dQ54SlhdWIJ1zeOmsdGgi3z16At6oFkLBJIkxs3ybw8cZadm1J721J3/X RuX+zFf747WDDMq40qwQ7hGdKZTRI8O9x2zgAGPtuIvSKSNOQHXV41GbVoIgEdUS1V OmSxfBi1wnijdRACzx+UUpXGJnbIuj0U6t59SaHk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Samuel Holland , Dhruva Gole , Miquel Raynal , Sasha Levin Subject: [PATCH 4.14 066/193] mtd: rawnand: sunxi: Fix the size of the last OOB region Date: Fri, 10 Mar 2023 14:37:28 +0100 Message-Id: <20230310133713.229452883@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133710.926811681@linuxfoundation.org> References: <20230310133710.926811681@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Samuel Holland [ 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 Acked-By: Dhruva Gole Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-6-samuel@sholland.org Signed-off-by: Sasha Levin --- drivers/mtd/nand/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 916e0ccd1e27e..f8e98b1eaede7 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -1786,7 +1786,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; } -- 2.39.2