From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bootlin.com ([62.4.15.54]:44822 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727403AbeLMK5E (ORCPT ); Thu, 13 Dec 2018 05:57:04 -0500 Date: Thu, 13 Dec 2018 11:57:01 +0100 From: Miquel Raynal To: Boris Brezillon Cc: Richard Weinberger , linux-mtd@lists.infradead.org, David Woodhouse , Brian Norris , Marek Vasut , stable@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: Fix JEDEC detection Message-ID: <20181213115701.06cee323@xps13> In-Reply-To: <20181213105526.30871-1-boris.brezillon@bootlin.com> References: <20181213105526.30871-1-boris.brezillon@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: stable-owner@vger.kernel.org List-ID: Hi Boris, Boris Brezillon wrote on Thu, 13 Dec 2018 11:55:26 +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: > Signed-off-by: Boris Brezillon > --- > drivers/mtd/nand/raw/nand_jedec.c | 2 ++ > 1 file changed, 2 insertions(+) > > 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; Sorry for the mistake. Acked-by: Miquel Raynal Thanks, Miquèl