Skip to content
Commit d2e8d0a0 authored by Guillaume Gautier's avatar Guillaume Gautier Committed by Daniel DeGrasse
Browse files

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: default avatarGuillaume Gautier <guillaume.gautier-ext@st.com>
parent 1de500e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment