Skip to content
Unverified Commit 7684580d authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer



During device removal, the driver should unregister the SPI controller
and stop the hardware.  Otherwise the dspi_transfer_one_message() could
wait on completion infinitely.

Additionally, calling spi_unregister_controller() first in device
removal reverse-matches the probe function, where SPI controller is
registered at the end.

Fixes: 05209f45 ("spi: fsl-dspi: add missing clk_disable_unprepare() in dspi_remove()")
Reported-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200622110543.5035-1-krzk@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 06096cc6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment