]> Git Repo - J-linux.git/commitdiff
mtd: rawnand: hynix: fixed typo
authorMaxim Korotkov <[email protected]>
Wed, 13 Mar 2024 10:27:20 +0000 (13:27 +0300)
committerMiquel Raynal <[email protected]>
Mon, 25 Mar 2024 10:20:37 +0000 (11:20 +0100)
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 <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
drivers/mtd/nand/raw/nand_hynix.c

index a74e64e0cfa3231ddce31310c93dba2ca6425592..c02e50608816a2314a77c7eb14282f289d2f0daf 100644 (file)
@@ -401,7 +401,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,
This page took 0.055118 seconds and 4 git commands to generate.