From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= Date: Fri, 13 Jul 2018 18:10:24 +0200 Subject: [U-Boot] [PATCH 2/2] mtd: nand: sunxi: Return on set_feature only when not ENOTSUPP In-Reply-To: <20180713161024.26384-1-mylene.josserand@bootlin.com> References: <20180713161024.26384-1-mylene.josserand@bootlin.com> Message-ID: <20180713161024.26384-3-mylene.josserand@bootlin.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Return the error code of the set_features function only if the error code is not ENOTSUPP. Otherwise, if this function is not supported, it will return and fail to initialize the NAND. Signed-off-by: Myl=C3=A8ne Josserand --- drivers/mtd/nand/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index bb87aca698..3ccb168d13 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -1369,7 +1369,7 @@ static int sunxi_nand_chip_init_timings(struct sunxi_= nand_chip *chip) ONFI_FEATURE_ADDR_TIMING_MODE, feature); chip->nand.select_chip(mtd, -1); - if (ret) + if (ret && ret !=3D -ENOTSUPP) return ret; } } --=20 2.11.0