]> git.baikalelectronics.ru Git - kernel.git/commit
spi: stm32: Fix error handling in stm32_spi_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 30 Mar 2018 19:54:44 +0000 (22:54 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 17 Apr 2018 10:46:23 +0000 (11:46 +0100)
commitecc61d41a45ccf324d695d0b97be891f26ba47e6
treefe8c9c746fa91adbe47fca0d6d9b9d26af6c07bc
parent8ded2a1c15087f4c044df3a3a792d81262a28971
spi: stm32: Fix error handling in stm32_spi_probe()

clk_get_rate() is below clk_prepare_enable(), so
its error should lead to goto err_clk_disable, not to err_master_put.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c