[PATCH] mxc_nand: fix copy_spare
From: baruch@tkos.co.il (Baruch Siach)
Date: 2015-09-24 04:25:12
Hi Eric, On Wed, Sep 23, 2015 at 05:07:28PM +0200, Eric B?nard wrote:
it was broken by 35d5d20efad8a04c8c002c7f31241dff973977a6 "mtd: mxc_nand: cleanup copy_spare function" else we get the following error :
[long kernel oops resulting in:]
Segmentation fault Signed-off-by: Eric B?nard <redacted> Cc: Uwe Kleine-K?nig <redacted>
Reviewed-by: Baruch Siach <baruch@tkos.co.il> Sorry for not catching it earlier. Thanks, baruch
quoted hunk ↗ jump to hunk
--- drivers/mtd/nand/mxc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 2426db8..f04445b 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c@@ -879,7 +879,7 @@ static void copy_spare(struct mtd_info *mtd, bool bfrom) oob_chunk_size); /* the last chunk */ - memcpy16_toio(&s[oob_chunk_size * sparebuf_size], + memcpy16_toio(&s[i * sparebuf_size], &d[i * oob_chunk_size], host->used_oobsize - i * oob_chunk_size); }
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -