Skip to content

Commit 1108b87

Browse files
jhovoldgregkh
authored andcommitted
spi: s3c64xx: fix NULL-deref on driver unbind
commit 45daacb upstream. A change moving DMA channel allocation from probe() back to s3c64xx_spi_prepare_transfer() failed to remove the corresponding deallocation from remove(). Drop the bogus DMA channel release from remove() to avoid triggering a NULL-pointer dereference on driver unbind. This issue was flagged by Sashiko when reviewing a controller deregistration fix. Fixes: f52b03c ("spi: s3c64xx: requests spi-dma channel only during data transfer") Cc: stable@vger.kernel.org # 6.0 Cc: Adithya K V <adithya.kv@samsung.com> Link: https://sashiko.dev/#/patchset/20260410081757.503099-1-johan%40kernel.org Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260410094925.518343-1-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 487f656 commit 1108b87

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/spi/spi-s3c64xx.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,11 +1338,6 @@ static void s3c64xx_spi_remove(struct platform_device *pdev)
13381338

13391339
writel(0, sdd->regs + S3C64XX_SPI_INT_EN);
13401340

1341-
if (!is_polling(sdd)) {
1342-
dma_release_channel(sdd->rx_dma.ch);
1343-
dma_release_channel(sdd->tx_dma.ch);
1344-
}
1345-
13461341
pm_runtime_put_noidle(&pdev->dev);
13471342
pm_runtime_disable(&pdev->dev);
13481343
pm_runtime_set_suspended(&pdev->dev);

0 commit comments

Comments
 (0)