Merge branch 'signal-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / spi / spi-davinci.c
index 818f2b2..7453a1d 100644 (file)
@@ -1040,13 +1040,13 @@ static int davinci_spi_remove(struct platform_device *pdev)
        spi_bitbang_stop(&dspi->bitbang);
 
        clk_disable_unprepare(dspi->clk);
-       spi_master_put(master);
 
        if (dspi->dma_rx) {
                dma_release_channel(dspi->dma_rx);
                dma_release_channel(dspi->dma_tx);
        }
 
+       spi_master_put(master);
        return 0;
 }