public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: hynix: fixed typo
@ 2024-03-13 10:27 Maxim Korotkov
  2024-03-15 11:23 ` Miquel Raynal
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Maxim Korotkov @ 2024-03-13 10:27 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Maxim Korotkov, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Hector Palacios, linux-mtd, linux-kernel,
	lvc-project

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>
---
 drivers/mtd/nand/raw/nand_hynix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/nand_hynix.c b/drivers/mtd/nand/raw/nand_hynix.c
index 39076735a3fb..9695f07b5eb2 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,
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-25 15:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-13 10:27 [PATCH] mtd: rawnand: hynix: fixed typo Maxim Korotkov
2024-03-15 11:23 ` Miquel Raynal
2024-03-15 11:45   ` Maxim Korotkov
2024-03-15 12:14     ` Miquel Raynal
2024-03-25 10:18 ` Miquel Raynal
2024-03-25 10:20 ` Miquel Raynal
2024-03-25 15:41 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox