mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
spi: geni-qcom: Fix incorrect free_irq() sequence
[ Upstream commitb787a33864
] In spi_geni_remove(), the free_irq() sequence is different from that on the probe error path. And the IRQ will still remain and it's interrupt handler may use the dma channel after release dma channel and before free irq, which is not secure, fix it. Fixes:b59c122484
("spi: spi-geni-qcom: Add support for GPI dma") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240909073141.951494-3-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
64cdc5d114
commit
f9e08c2017
|
@ -1170,9 +1170,9 @@ static void spi_geni_remove(struct platform_device *pdev)
|
|||
/* Unregister _before_ disabling pm_runtime() so we stop transfers */
|
||||
spi_unregister_master(spi);
|
||||
|
||||
spi_geni_release_dma_chan(mas);
|
||||
|
||||
free_irq(mas->irq, spi);
|
||||
|
||||
spi_geni_release_dma_chan(mas);
|
||||
}
|
||||
|
||||
static int __maybe_unused spi_geni_runtime_suspend(struct device *dev)
|
||||
|
|
Loading…
Reference in New Issue
Block a user