diff options
author | Volker Haspel <volker.haspel@linutronix.de> | 2019-03-12 11:12:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-13 15:18:39 +0000 |
commit | 8fcb830a00f0980ffe38d223cdd9a4d2d24da476 (patch) | |
tree | 06033713a7ebaa013fe4d4b33e07291905d6203a /drivers/spi/spi-fsl-qspi.c | |
parent | 0a9c8998e75b69b3c347751a65ddd5bf7e72b2dd (diff) | |
download | lwn-8fcb830a00f0980ffe38d223cdd9a4d2d24da476.tar.gz lwn-8fcb830a00f0980ffe38d223cdd9a4d2d24da476.zip |
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>
Diffstat (limited to 'drivers/spi/spi-fsl-qspi.c')
-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) ctlr->dev.of_node = np; - ret = spi_register_controller(ctlr); + ret = devm_spi_register_controller(dev, ctlr); if (ret) goto err_destroy_mutex; |