Skip to content
Unverified Commit c86a918b authored by David Lechner's avatar David Lechner Committed by Mark Brown
Browse files

spi: don't unoptimize message in spi_async()



Calling spi_maybe_unoptimize_message() in spi_async() is wrong because
the message is likely to be in the queue and not transferred yet. This
can corrupt the message while it is being used by the controller driver.

spi_maybe_unoptimize_message() is already called in the correct place
in spi_finalize_current_message() to balance the call to
spi_maybe_optimize_message() in spi_async().

Fixes: 7b1d87af ("spi: add spi_optimize_message() APIs")
Signed-off-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240708-spi-mux-fix-v1-1-6c8845193128@baylibre.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8221545c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment