summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMaxim Korotkov <korotkov.maxim.s@gmail.com>2024-03-13 13:27:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-12 12:03:22 +0300
commit3115fb2cc55c45d237e7bfdcd04ed6eab3932b4c (patch)
treeb2672685ec4f7e85643854ca3a773e4107f9848a /drivers/mtd
parent534fd7770b6ddedc6c6ef6fa724987d3397f9b3b (diff)
downloadlinux-3115fb2cc55c45d237e7bfdcd04ed6eab3932b4c.tar.xz
mtd: rawnand: hynix: fixed typo
[ 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: 626994e07480 ("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs") Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20240313102721.1991299-1-korotkov.maxim.s@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/nand_hynix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/nand_hynix.c b/drivers/mtd/nand/raw/nand_hynix.c
index 0d4d4bbfdece..49e36767d8f7 100644
--- a/drivers/mtd/nand/raw/nand_hynix.c
+++ b/drivers/mtd/nand/raw/nand_hynix.c
@@ -402,7 +402,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,