]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: rawnand: Fix JEDEC detection
authorBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 13 Dec 2018 10:55:26 +0000 (11:55 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 14 Dec 2018 21:45:13 +0000 (22:45 +0100)
nand_jedec_detect() should return 1 when the PARAM page parsing
succeeds, otherwise the core considers JEDEC detection failed and falls
back to ID-based detection.

Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_jedec.c

index 5c26492c841dd2ab21c1f7ad526d0a66ac622f89..38b5dc22cb30a6c56dec29ba71fe2b93b1362555 100644 (file)
@@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)
                pr_warn("Invalid codeword size\n");
        }
 
+       ret = 1;
+
 free_jedec_param_page:
        kfree(p);
        return ret;