Commit 5d4db691 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

spi: rspi: Drop variable "error" in qspi_trigger_transfer_out_in()

Just use "ret" instead, for consistency with other similar functions.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fda052b0
...@@ -725,24 +725,23 @@ static int qspi_trigger_transfer_out_in(struct rspi_data *rspi, const u8 *tx, ...@@ -725,24 +725,23 @@ static int qspi_trigger_transfer_out_in(struct rspi_data *rspi, const u8 *tx,
u8 *rx, unsigned int len) u8 *rx, unsigned int len)
{ {
int i, n, ret; int i, n, ret;
int error;
while (len > 0) { while (len > 0) {
n = qspi_set_send_trigger(rspi, len); n = qspi_set_send_trigger(rspi, len);
qspi_set_receive_trigger(rspi, len); qspi_set_receive_trigger(rspi, len);
if (n == QSPI_BUFFER_SIZE) { if (n == QSPI_BUFFER_SIZE) {
error = rspi_wait_for_tx_empty(rspi); ret = rspi_wait_for_tx_empty(rspi);
if (error < 0) { if (ret < 0) {
dev_err(&rspi->master->dev, "transmit timeout\n"); dev_err(&rspi->master->dev, "transmit timeout\n");
return error; return ret;
} }
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
rspi_write_data(rspi, *tx++); rspi_write_data(rspi, *tx++);
error = rspi_wait_for_rx_full(rspi); ret = rspi_wait_for_rx_full(rspi);
if (error < 0) { if (ret < 0) {
dev_err(&rspi->master->dev, "receive timeout\n"); dev_err(&rspi->master->dev, "receive timeout\n");
return error; return ret;
} }
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
*rx++ = rspi_read_data(rspi); *rx++ = rspi_read_data(rspi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment