spi: stm32-qspi: Fix error path in case of -EPROBE_DEFER
In case of -EPROBE_DEFER, stm32_qspi_release() was called
in any case which unregistered driver from pm_runtime framework
even if it has not been registered yet to it. This leads to:
stm32-qspi
58003000.spi: can't setup spi0.0, status -13
spi_master spi0: spi_device register error /soc/spi@
58003000/mx66l51235l@0
spi_master spi0: Failed to create SPI device for /soc/spi@
58003000/mx66l51235l@0
stm32-qspi
58003000.spi: can't setup spi0.1, status -13
spi_master spi0: spi_device register error /soc/spi@
58003000/mx66l51235l@1
spi_master spi0: Failed to create SPI device for /soc/spi@
58003000/mx66l51235l@1
On v5.7 kernel,this issue was not "visible", qspi driver was probed
successfully.
Fixes: 9d282c17b023 ("spi: stm32-qspi: Add pm_runtime support")
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Link: https://lore.kernel.org/r/20200616113035.4514-1-patrice.chotard@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>