Skip to content
Commit bb9fe428 authored by Armando Visconti's avatar Armando Visconti Committed by Kumar Gala
Browse files

spi: spi_ll_stm32: Fix transceive() ret value in spi_slave case



In SPI slave case the transceive should return either the negative
errno code in case of error or the number of frames received.
So, now:

 1. the spi_stm32_get_err() routine already checks whether
    the SPI cell got an error and returns -EIO in that case.

 2. the transceive() routine always returns whatever the
    spi_context_wait_for_completion() has returned, which
    is either:
        a. -EIO in case of error
        b. 0 in spi_master ok case
        c. the number of frames received in spi_slave ok case

Signed-off-by: default avatarArmando Visconti <armando.visconti@st.com>
parent fa153a00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment