Skip to content

Commit 6eadad4

Browse files
jhovoldgregkh
authored andcommitted
spi: rockchip: fix controller deregistration
commit 53e7a16 upstream. Make sure to deregister the controller before freeing underlying resources like DMA channels during driver unbind. Fixes: 64e3682 ("spi/rockchip: add driver for Rockchip RK3xxx SoCs integrated SPI") Cc: stable@vger.kernel.org # 3.17 Cc: addy ke <addy.ke@rock-chips.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260324082326.901043-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7e8df8f commit 6eadad4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/spi/spi-rockchip.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
908908
break;
909909
}
910910

911-
ret = devm_spi_register_controller(&pdev->dev, ctlr);
911+
ret = spi_register_controller(ctlr);
912912
if (ret < 0) {
913913
dev_err(&pdev->dev, "Failed to register controller\n");
914914
goto err_free_dma_rx;
@@ -936,6 +936,8 @@ static void rockchip_spi_remove(struct platform_device *pdev)
936936

937937
pm_runtime_get_sync(&pdev->dev);
938938

939+
spi_unregister_controller(ctlr);
940+
939941
pm_runtime_put_noidle(&pdev->dev);
940942
pm_runtime_disable(&pdev->dev);
941943
pm_runtime_set_suspended(&pdev->dev);

0 commit comments

Comments
 (0)