Commit d989eed2 authored by Gao Pan's avatar Gao Pan Committed by Mark Brown

spi: fsl-lpspi: quit reading rx fifo under error condition

In case that error occurs during waiting for txfifo empty, it is
not necessary to read rx fifo. It's better to return directly.
Signed-off-by: default avatarGao Pan <pandy.gao@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b6787b68
......@@ -350,9 +350,12 @@ static int fsl_lpspi_transfer_one(struct spi_master *master,
}
ret = fsl_lpspi_txfifo_empty(fsl_lpspi);
if (ret)
return ret;
fsl_lpspi_read_rx_fifo(fsl_lpspi);
return ret;
return 0;
}
static int fsl_lpspi_transfer_one_msg(struct spi_master *master,
......
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