Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Volker Haspel and committed by
Mark Brown
8fcb830a 0a9c8998

+1 -1
+1 -1
drivers/spi/spi-fsl-qspi.c
··· 882 882 883 883 ctlr->dev.of_node = np; 884 884 885 - ret = spi_register_controller(ctlr); 885 + ret = devm_spi_register_controller(dev, ctlr); 886 886 if (ret) 887 887 goto err_destroy_mutex; 888 888