UPSTREAM: 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.

Change-Id: I8fc8c50831fa8c078cb503fd6d2cd9bf9f1032bc
Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 850bdafa503e2045a8e931ce601fd71dc33157cf)
This commit is contained in:
Mylène Josserand 2018-07-13 18:10:24 +02:00 committed by Kever Yang
parent 1aab2d2cbb
commit 818820e840
1 changed files with 1 additions and 1 deletions

View File

@ -1370,7 +1370,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;
}
}