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>
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);
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);