Skip to content
Snippets Groups Projects
Commit dfe72d08 authored by Christophe Kerello's avatar Christophe Kerello Committed by Jagan Teki
Browse files

spi: soft_spi: Fix data abort if slave is not probed


In case spi_get_bus_and_cs callback is used, spi bus is first probed
then slave devices are probed. To avoid a data abort in soft_spi probe
function, we need to check that (slave != NULL).

If slave is NULL, cs_flags and clk_flags will be initialized with
respectively GPIOD_ACTIVE_LOW and 0.

Signed-off-by: default avatarChristophe Kerello <christophe.kerello@st.com>
Signed-off-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
parent 07a5cb9d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment