diff options
author | Mylène Josserand <mylene.josserand@bootlin.com> | 2018-07-13 18:10:23 +0200 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2018-07-31 20:45:42 +0530 |
commit | cbe9ea26e3a275bc3e47414797406a234c0baa55 (patch) | |
tree | 322c7a13a601bf4a8a9c5bb1e197b3f80bed6692 /drivers/mtd | |
parent | 33620947333f08d54abb96c0936937db1d315931 (diff) |
mtd: nand: nand_base: Convert EINVAL into ENOTSUPP
Convert the EINVAL error into ENOTSUPP when the GET/SET_FEATURES
is not supported.
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/nand_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 64e4621aaa..9094f857c1 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3041,7 +3041,7 @@ static int nand_onfi_set_features(struct mtd_info *mtd, struct nand_chip *chip, if (!chip->onfi_version || !(le16_to_cpu(chip->onfi_params.opt_cmd) & ONFI_OPT_CMD_SET_GET_FEATURES)) - return -EINVAL; + return -ENOTSUPP; #endif chip->cmdfunc(mtd, NAND_CMD_SET_FEATURES, addr, -1); @@ -3070,7 +3070,7 @@ static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip, if (!chip->onfi_version || !(le16_to_cpu(chip->onfi_params.opt_cmd) & ONFI_OPT_CMD_SET_GET_FEATURES)) - return -EINVAL; + return -ENOTSUPP; #endif chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1); |