summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMylène Josserand <mylene.josserand@bootlin.com>2018-07-13 18:10:24 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-07-31 20:45:50 +0530
commit850bdafa503e2045a8e931ce601fd71dc33157cf (patch)
treeab1f5a9f14d55b5116005f47f90202701fbd234d /drivers/mtd
parentcbe9ea26e3a275bc3e47414797406a234c0baa55 (diff)
mtd: nand: sunxi: Return on set_feature only when not ENOTSUPP
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ène Josserand <mylene.josserand@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/sunxi_nand.c2
1 files changed, 1 insertions, 1 deletions
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 != -ENOTSUPP)
return ret;
}
}