summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-12-13 11:55:26 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-12-14 22:45:13 +0100
commitb637ef779575a977068025f842ecd480a9671f3f (patch)
tree1cafba2f5ded409744a4ad422ee69695dd68ba4b /drivers
parent38842572df1c79213b99e0c3472ce95aa5d152cf (diff)
downloadblackbird-op-linux-b637ef779575a977068025f842ecd480a9671f3f.tar.gz
blackbird-op-linux-b637ef779575a977068025f842ecd480a9671f3f.zip
mtd: rawnand: Fix JEDEC detection
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/nand_jedec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
index 5c26492c841d..38b5dc22cb30 100644
--- a/drivers/mtd/nand/raw/nand_jedec.c
+++ b/drivers/mtd/nand/raw/nand_jedec.c
@@ -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;
OpenPOWER on IntegriCloud