Commit 5580a914 authored by Maxim Korotkov's avatar Maxim Korotkov Committed by Yi Yang
Browse files

mtd: rawnand: hynix: fixed typo

stable inclusion
from stable-v4.19.316
commit 80850a39e2548988f4feae26f3fd66286b460278
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IANCT2
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=80850a39e2548988f4feae26f3fd66286b460278



--------------------------------

[ Upstream commit 6819db94e1cd3ce24a432f3616cd563ed0c4eaba ]

The function hynix_nand_rr_init() should probably return an error code.
Judging by the usage, it seems that the return code is passed up
the call stack.
Right now, it always returns 0 and the function hynix_nand_cleanup()
in hynix_nand_init() has never been called.

Found by RASU JSC and Linux Verification Center (linuxtesting.org)

Fixes: 626994e0 ("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs")

Signed-off-by: default avatarMaxim Korotkov <korotkov.maxim.s@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240313102721.1991299-1-korotkov.maxim.s@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
parent 163da6b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -414,7 +414,7 @@ static int hynix_nand_rr_init(struct nand_chip *chip)
	if (ret)
		pr_warn("failed to initialize read-retry infrastructure");

	return 0;
	return ret;
}

static void hynix_nand_extract_oobsize(struct nand_chip *chip,