未验证 提交 2aaa8dd0 编写于 作者: T Tudor Ambarus 提交者: Mark Brown

spi: atmel-quadspi: return appropriate error code

Return -ENOTSUPP when atmel_qspi_find_mode() fails. Propagate
the error in atmel_qspi_exec_op().
Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: NBoris Brezillon <bbrezillon@kernel.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 9ce4c512
......@@ -198,7 +198,7 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op)
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,
......@@ -238,7 +238,7 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
mode = atmel_qspi_find_mode(op);
if (mode < 0)
return -ENOTSUPP;
return mode;
ifr |= sama5d2_qspi_modes[mode].config;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册