Return -ENOTSUPP when atmel_qspi_find_mode() fails. Propagate
the error in atmel_qspi_exec_op().
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
if (atmel_qspi_is_compatible(op, &sama5d2_qspi_modes[i]))
return i;
- return -1;
+ return -ENOTSUPP;
}
static bool atmel_qspi_supports_op(struct spi_mem *mem,
mode = atmel_qspi_find_mode(op);
if (mode < 0)
- return -ENOTSUPP;
+ return mode;
ifr |= sama5d2_qspi_modes[mode].config;