2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 17:53:56 +08:00

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>
This commit is contained in:
Chuhong Yuan 2019-11-09 15:55:17 +08:00 committed by Mark Brown
parent 8d8584912a
commit 69c23dbf5f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;