diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-11-09 10:55:17 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-11-11 15:50:48 +0300 |
commit | 69c23dbf5f695c219008257b3bd86cff63edbe0b (patch) | |
tree | 2f00d2d4e63e1336495e228f390810c881886e9f /drivers/spi | |
parent | 8d8584912a4348ca41653dca70f2099a82e644d9 (diff) | |
download | linux-69c23dbf5f695c219008257b3bd86cff63edbe0b.tar.xz |
spi: nxp-fspi: Use devm API to fix missed unregistration of controller
This driver forgets to unregister controller when remove.
Use devm API to unregister it automatically to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191109075517.29988-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-nxp-fspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index 501b923f2c27..c36bb1bb464e 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -1027,7 +1027,7 @@ static int nxp_fspi_probe(struct platform_device *pdev) ctlr->dev.of_node = np; - ret = spi_register_controller(ctlr); + ret = devm_spi_register_controller(&pdev->dev, ctlr); if (ret) goto err_destroy_mutex; |