mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
spi: fsl-espi: fix status handling in fsl_espi_do_one_msg
If an error occurred during message handling return this error instead of always returning 0 and align the code with the generic implementation in spi_transfer_one_message. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
e33a3ade90
commit
0319d4991e
1 changed files with 5 additions and 2 deletions
|
|
@ -381,9 +381,12 @@ static int fsl_espi_do_one_msg(struct spi_master *master,
|
|||
ret = fsl_espi_rw_trans(m, &espi_trans, rx_buf);
|
||||
|
||||
m->actual_length = espi_trans.actual_length;
|
||||
m->status = ret;
|
||||
if (m->status == -EINPROGRESS)
|
||||
m->status = ret;
|
||||
|
||||
spi_finalize_current_message(master);
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fsl_espi_setup(struct spi_device *spi)
|
||||
|
|
|
|||
Loading…
Reference in a new issue