Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: s3c64xx: fix NULL-deref on driver unbind

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: f52b03c70744 ("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>

authored by

Johan Hovold and committed by
Mark Brown
45daacbe 81c9cdb1

-5
-5
drivers/spi/spi-s3c64xx.c
··· 1403 1403 1404 1404 writel(0, sdd->regs + S3C64XX_SPI_INT_EN); 1405 1405 1406 - if (!is_polling(sdd)) { 1407 - dma_release_channel(sdd->rx_dma.ch); 1408 - dma_release_channel(sdd->tx_dma.ch); 1409 - } 1410 - 1411 1406 pm_runtime_put_noidle(&pdev->dev); 1412 1407 pm_runtime_disable(&pdev->dev); 1413 1408 pm_runtime_set_suspended(&pdev->dev);