drivers: spi: context: check that config exists before reading it
Function spi_context_release reads the content of ctx->config without
checking first if it is set. In many drivers (including STM32), when a bad
configuration is made for the first transaction, ctx->config is not set,
and spi_context_release is called, resulting in hard fault.
This commit adds a check that ctx->config exists before reading it to
avoid this problem.
Signed-off-by:
Guillaume Gautier <guillaume.gautier-ext@st.com>
Loading
Please sign in to comment