diff options
author | Volker Haspel <volker.haspel@linutronix.de> | 2019-03-12 06:12:03 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-13 11:18:39 -0400 |
commit | 8fcb830a00f0980ffe38d223cdd9a4d2d24da476 (patch) | |
tree | 06033713a7ebaa013fe4d4b33e07291905d6203a | |
parent | 0a9c8998e75b69b3c347751a65ddd5bf7e72b2dd (diff) |
spi: spi-fsl-qspi: use devm_spi_register_controller
The driver does not clearly unregister the spi controller.
Therefore calling an unbind and bind again will end up in a
Kernel crash.
The function devm_spi_register_controller will automatically
be unregister the SPI device.
Signed-off-by: Volker Haspel <volker.haspel@linutronix.de>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-fsl-qspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c index 6a713f78a62e..41a49b93ca60 100644 --- a/drivers/spi/spi-fsl-qspi.c +++ b/drivers/spi/spi-fsl-qspi.c | |||
@@ -882,7 +882,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) | |||
882 | 882 | ||
883 | ctlr->dev.of_node = np; | 883 | ctlr->dev.of_node = np; |
884 | 884 | ||
885 | ret = spi_register_controller(ctlr); | 885 | ret = devm_spi_register_controller(dev, ctlr); |
886 | if (ret) | 886 | if (ret) |
887 | goto err_destroy_mutex; | 887 | goto err_destroy_mutex; |
888 | 888 | ||